setXYZ

HC Graphics Absolute Turtle Motion setXYZ
setXY setPos

setXYZ xcor ycor zcor


Moves the turtle to an absolute 3D position. The three arguments are numbers, Lists, Arrays or FloatArrays representing the X, Y and Z coordinates.

This command is designed to run in perspective mode. See also PosXYZ.

Example (draw a wireframe cube):

perspective
l=100
setXYZ l 0 0
setXYZ l l 0
setXYZ 0 l 0
setXYZ 0 0 0
setXYZ l 0 0
setXYZ l 0 l
setXYZ 0 0 l
setXYZ 0 0 0
setXYZ 0 0 l
setXYZ 0 l l
setXYZ l l l
setXYZ l 0 l
setXYZ l l l
setXYZ l l 0
setXYZ 0 l 0
setXYZ 0 l l
rotatescene

Example (draw some sine waves in 3D):

perspective
for [i 0 360 10] ~
[	for [j 0 360] ~
	[	setxyz j 200*(sin j)*sin i -i
	]
	pu
	setxyz 0 0 -:i
	pd
]
rotatescene

Examples:

References:

setXY setPos