Can someone explain to me how to draw, say using the circle command to a memblock, then display it.
Or if that isn't possible, how can I create some section of memory, using the simple 2D commands, off screen, then blit them to the screen for better preformance.
Here's some code I'm trying to speed up:
Set Display Mode 800,600,32
sync on
type Tcurl
x as integer
y as integer
endtype
dim curl(360) as Tcurl
` load curl
For i = 0 to 360
curl(i).x = polar2rectX(i,i)
curl(i).y = polar2rectY(i,i)
Sx = screenX_800(curl(i).x)
Sy = screenY_600(curl(i).y)
Next i
` rotate and draw curl
For j = 0 to 360
For i = 0 to 360
Tx = rotateX(curl(i).x,curl(i).y,j)
Ty = rotateY(curl(i).x,curl(i).y,j)
Sx = screenX_800(Tx)
Sy = screenY_600(Ty)
Plot_PenPoint(Sx,Sy, 0)
Next i
sync
next j
Function screenX_800(xCart)
xCart = xCart + 400
Endfunction xCart
Function screenY_600(yCart)
yCart = 300 - yCart
Endfunction yCart
Function polar2rectX(r,theta)
x = r * cos(theta)
EndFunction x
Function polar2rectY(r,theta)
y = r * sin(theta)
EndFunction y
Function rotateX(Px,Py,theta)
Tx = (Px * cos(theta)) - (Py * sin(theta))
EndFunction Tx
Function rotateY(Px,Py,theta)
Ty = (Px * sin(theta)) + (Py * cos(theta))
EndFunction Ty
Function Plot_PenPoint(x,y, radius)
For i = 0 to radius
Circle x,y,i
Next i
For i = 0 to radius
Circle x+1,y+1,i
Next i
For i = 0 to radius
Circle x-1,y-1,i
Next i
For i = 0 to radius
Circle x-1,y+1,i
Next i
For i = 0 to radius
Circle x+1,y-1,i
Next i
EndFunction