Hello,
How does this run with you ?
Use the new dll 24.01.2014. I got no problem.
include "sw.inc"
include "gl.inc"
hwnd=Window 640,480,1
Init2D hwnd
int ox = GetWidth() /2
int oy = GetHeight()/2
int cx, cy, pen=1
Sub Pos(int x,y)
iF pen then DrawLine(ox+cx,oy-cy,ox+x,oy-y, 1, 240,240,240,255)
cx = x
cy = y
End Sub
Sub iPoint(single a,b,c)
pos((a-c)*0.886, b-(a+c)*0.5)
End Sub
Sub Cone(single r,l)
r= l/2
pen=0
single h, v
For h=0 to l step 10
For v=0 to 360 step 20
iPoint((h/2)*cos(rad(v)), h, (h/2)*sin(rad(v)))
pen=1
Next
pen=0
Next
For v=0 to 360 step 20
For h=0 to l step 10
iPoint((h/2)*cos(rad(v)), h, (h/2)*sin(rad(v)))
pen=1
Next
pen=0
Next
End Sub
Sub Ellipsoid(single r1, r2, r3)
single u, v, l, m, n
pen=0
For u=0 to 360 step 20
For v=0 to 180 step 20
l = (r1 * cos(rad(u))) * sin(rad(v))
m = r3 * sin(rad(u))
n = (r2 * cos(rad(u))) * cos(rad(v))
iPoint(100 + l, -30 + m, 100 + n)
pen=1
Next
pen=0
Next
For v=0 to 180 step 20
For u=0 to 360 step 20
l = (r1 * cos(rad(u))) * sin(rad(v))
m = r3 * sin(rad(u))
n = r2 * cos(rad(u)) * cos(rad(v))
iPoint(100 + l, -30 + m, 100 + n)
pen=1
Next
pen=0
Next
End Sub
Sub Cylinder(single r, l)
int h, v
pen=0
For h=0 to l step 10
For v=0 to 360 step 20
iPoint(120+r*cos(rad(v)), -100+h, -120+r*sin(rad(v)))
pen=1
Next
pen=0
Next
For v=0 to 360 step 20
For h=0 to l step 10
iPoint(120+r*cos(rad(v)), -100+h, -120+r*sin(rad(v)))
pen=1
Next
pen=0
Next
End Sub
Sub Sphere(single r)
single u, v, l, m, n
pen=0
For u=0 to 360 step 20
For v=0 to 180 step 20
l = (r * cos(rad(u))) * sin(rad(v))
m = r * sin(rad(u))
n = (r * cos(rad(u))) * cos(rad(v))
iPoint(-120 + l, -100 + m, 120 + n)
pen=1
Next
pen=0
Next
For v=0 to 180 step 20
For u=0 to 360 step 20
l = (r * cos(rad(u))) * sin(rad(v))
m = r * sin(rad(u))
n = (r * cos(rad(u))) * cos(rad(v))
iPoint(-120 + l, -100 + m, 120 + n)
pen=1
Next
pen=0
Next
End Sub
while Key(27)=0
Sphere(40)
Cone(40, 70)
Cylinder(30, 90)
Ellipsoid(60, 40, 25)
DoEvents
SwapBuffer
wend
Quit2D
CloseWindow