i can get you a better 2d to 3d conversion method using elipses.......i thought of this all by myself (which is y its kinda crazy to understand......
Code:
TYPE AxisType
x AS SINGLE
y AS SINGLE
z AS SINGLE
END TYPE
TYPE CoordType
axis AS AxisType ' X,Y,Z coordinates
rx AS SINGLE ' X radius
ry AS SINGLE ' Y radius
a AS SINGLE ' last recorded angle
END TYPE
TYPE ObjectType
centerL AS AxisType 'Left
centerR AS AxisType 'Right
centerC AS AxisType 'Center
END TYPE
DIM CObject AS ObjectType
DIM Coord(1 TO 2, 1 TO 20) AS CoordType
DECLARE FUNCTION x2d! (x AS SINGLE, z AS SINGLE)
DECLARE FUNCTION y2d! (y AS SINGLE, z AS SINGLE)
SCREEN 12
DIM Sine(360) AS SINGLE, Cosine(360) AS SINGLE
a = 0
FOR i! = 0 TO 6.28 STEP 6.28 / 360
Sine(a) = SIN(i!)
Cosine(a) = COS(i!)
a = a + 1
NEXT
DIM Shape AS INTEGER
DIM Speed AS AxisType
DIM angle(1 TO 2) AS SINGLE
DIM hilight AS INTEGER
DIM keys AS STRING
'Clear screen
CLS
'Create Interface
LINE (3, 3)-(640, 290), 15, BF
LINE (10, 10)-(630, 280), 0, BF
LOCATE 1, 5: PRINT "ÃOutput ShapeÃ"
LINE (3, 307)-(640, 450), 15, BF
LINE (10, 317)-(630, 440), 0, BF
LOCATE 20, 5: PRINT "ÃInput DataÃ"
'Initialize Center
' The Center
CObject.centerC.x = 640 \ 2
CObject.centerC.y = 480 \ 4
CObject.centerC.z = 10 \ 2
' The Left Side
CObject.centerL.x = CObject.centerC.x + 160 * Sine(270)
CObject.centerL.y = CObject.centerC.y + 80 * Cosine(270)
CObject.centerL.z = 10 \ 2
' The Right Side
CObject.centerR.x = CObject.centerC.x + 160 * Sine(90)
CObject.centerR.y = CObject.centerC.y + 80 * Cosine(90)
CObject.centerR.z = 10 \ 2 - 2
'Initialize Shape
Shape = 5
'Initialize Radius
FOR nn = 1 TO 2
FOR n = 1 TO Shape
Coord(nn, n).rx = 30
Coord(nn, n).ry = 30
NEXT
NEXT
angle = 90
DO
keys = INKEY$
'Erase Previous
CIRCLE (CObject.centerL.x, CObject.centerL.y), 2, 0
LINE (CObject.centerC.x, CObject.centerC.y)-(CObject.centerR.x, CObject.centerR.y), 0
CIRCLE (CObject.centerR.x, CObject.centerR.y), 2, 0
LINE (CObject.centerC.x, CObject.centerC.y)-(CObject.centerL.x, CObject.centerL.y), 0
CIRCLE (CObject.centerL.x, CObject.centerL.y), 2, 0
angle(1) = angle(1) + .01
IF angle(1) > 360 THEN angle(1) = 0
'Center Correction
' The Right Side
CObject.centerR.z = 10 \ 2
CObject.centerL.x = x2d(CObject.centerR.x, CObject.centerR.z)
CObject.centerL.y = x2d(CObject.centerR.y, CObject.centerR.z)
CObject.centerR.x = CObject.centerC.x + 160 * Sine(angle(1))
CObject.centerR.y = CObject.centerC.y + 80 * Cosine(angle(1))
' The Left Side
angle(2) = angle(1) + 180
IF angle(2) > 360 THEN angle(2) = angle(2) - 360
CObject.centerL.z = 10 \ 2
CObject.centerL.x = x2d(CObject.centerL.x, CObject.centerL.z)
CObject.centerL.y = x2d(CObject.centerL.y, CObject.centerL.z)
CObject.centerL.x = CObject.centerC.x + 160 * Sine(angle(2))
CObject.centerL.y = CObject.centerC.y + 80 * Cosine(angle(2))
'Draw Center
CIRCLE (CObject.centerC.x, CObject.centerC.y), 2, 15
CIRCLE (CObject.centerL.x, CObject.centerL.y), 2, 15
LINE (CObject.centerC.x, CObject.centerC.y)-(CObject.centerR.x, CObject.centerR.y), 1
CIRCLE (CObject.centerR.x, CObject.centerR.y), 2, 15
LINE (CObject.centerC.x, CObject.centerC.y)-(CObject.centerL.x, CObject.centerL.y), 1
CIRCLE (CObject.centerL.x, CObject.centerL.y), 2, 15
'Erase Previous PSETs
FOR sp = 1 TO Shape
PSET (Coord(1, sp).axis.x, Coord(1, sp).axis.y), 0
NEXT
FOR sp = 1 TO Shape
PSET (Coord(2, sp).axis.x, Coord(2, sp).axis.y), 0
NEXT
'Erase Connection lines
FOR sp = 1 TO Shape
init = sp
endd = sp + 1
IF endd > Shape THEN endd = endd - Shape
LINE (x2d(Coord(1, init).axis.x, Coord(1, init).axis.z), y2d(Coord(1, init).axis.y, Coord(1, init).axis.z))-(x2d(Coord(1, endd).axis.x, Coord(1, endd).axis.z), y2d(Coord(1, endd).axis.y, Coord(1, endd).axis.z)), 0
NEXT
'Calculate voxel
'Left Side
FOR sp = 1 TO Shape
Coord(1, sp).a = sp * (360 \ Shape) - 1
Coord(1, sp).axis.x = CObject.centerL.x + Coord(1, sp).rx * Sine(Coord(1, sp).a)
Coord(1, sp).axis.y = CObject.centerL.y + Coord(1, sp).ry * Cosine(Coord(1, sp).a)
Coord(1, sp).axis.z = ((CObject.centerC.y - Coord(1, sp).axis.x) / 30) * 10
Coord(1, sp).axis.x = x2d(Coord(1, sp).axis.x, Coord(1, sp).axis.z)
Coord(1, sp).axis.y = y2d(Coord(1, sp).axis.y, Coord(1, sp).axis.z)
NEXT sp
'Right Side
FOR sp = 1 TO Shape
Coord(2, sp).a = sp * (360 \ Shape) - 1
Coord(2, sp).axis.x = CObject.centerR.x + Coord(2, sp).rx * Sine(Coord(2, sp).a)
Coord(2, sp).axis.y = CObject.centerR.y + Coord(2, sp).ry * Cosine(Coord(2, sp).a)
Coord(2, sp).axis.z = ((CObject.centerC.y - Coord(2, sp).axis.x) / 30) * 10
Coord(2, sp).axis.x = x2d(Coord(2, sp).axis.x, Coord(2, sp).axis.z)
Coord(2, sp).axis.y = y2d(Coord(2, sp).axis.y, Coord(2, sp).axis.z)
NEXT sp
'Lines Connecting
FOR sp = 1 TO Shape
init = sp
endd = sp + 1
IF endd > Shape THEN endd = endd - Shape
LINE (Coord(1, init).axis.x, Coord(1, init).axis.y)-(Coord(1, endd).axis.x, Coord(1, endd).axis.y), 2
NEXT
FOR sp = 1 TO Shape
PSET (Coord(1, sp).axis.x, Coord(1, sp).axis.y), 2
NEXT
FOR sp = 1 TO Shape
PSET (Coord(2, sp).axis.x, Coord(2, sp).axis.y), 2
NEXT
LOOP UNTIL keys = CHR$(27)
'CLS
'SCREEN 9
'LOCATE 1, 1: PRINT "End of 3D example (v1.0)"
'SYSTEM
FUNCTION x2d! (x AS SINGLE, z AS SINGLE)
IF x = 0 OR z = 0 THEN
x = -1
EXIT FUNCTION
END IF
x2d = (((x) / z) + (640 \ 2)) - 320
END FUNCTION
FUNCTION y2d! (y AS SINGLE, z AS SINGLE)
IF y = 0 OR z = 0 THEN
y = -1
EXIT FUNCTION
END IF
y2d = (((y) / z) + (480 \ 2)) - 240
END FUNCTION