Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:48 22 Aug 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMiteVGA DEMO

     Page 13 of 13    
Author Message
javavi

Guru

Joined: 01/10/2023
Location: Ukraine
Posts: 591
Posted: 09:16am 22 Aug 2026
Copy link to clipboard 
Print this post


Option ANGLE DEGREES
RX=MM.HRES: RY=MM.VRES: CX=RX/2: CY=RY/2
Umin=-180: Umax=180: Ustep=14
Vmin= -90: Vmax= 90: Vstep=14
SCALE=220: C=1
Colour RGB(Cyan)
CLS

Do
 If C>0 Then C=0 Else C=1
 For S=0 To 12 Step 2
   For V= Vmin To Vmax Step Vstep
   For U= Umin To Umax Step Ustep
     U=U+S
       x=Cos(U)*Cos(V)
       y=Sin(U)*Cos(V)
       z=Sin(V)
     U=U-S
     Plot_XY
     If Inkey$ <> "" Then End
   Next U: Next V
 Next S
Loop

Sub Plot_XY
 x=SCALE*x: y=SCALE*y: z=SCALE*z
 y=y/3
 If y<0 Then
   Circle CX+x-y,CY+z-y,1,,,C
 Else
   Pixel CX+x-y,CY+z-y,C
 EndIf
End Sub
 
     Page 13 of 13    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026