Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : PicoMiteVGA DEMO

   Page 3 of 8    
Posted: 03:26pm
27 Sep 2024
Copy link to clipboard
javavi
Guru


  Pluto said  An other beautiful creation!


T=3000
For L=1 To T
 A=10*Pi*L/T
 B=16*Pi*L/T
 X=600*Cos(A)*(1-.5*Cos(B)^2)
 Y=600*Sin(A)*(1-.5*Cos(B)^2)
 R=600*(.005+.1*(Sin((52*Pi*L)/T))^4)
 For K=0 To 2*Pi Step Pi/R/1.5
   Pixel 600+X+Cos(K)*R,600+Y+Sin(K)*R
 Next K
Next L
 
Posted: 05:02pm
27 Sep 2024
Copy link to clipboard
Sasquatch
Guru


Modified for HDMI Widescreen Mode 1




'Note: Requires Pico2 HDMI Widescreen Mode 1 to see the full image
MODE 1
T=3000
For L=1 To T
A=10*Pi*L/T
B=16*Pi*L/T
X=400*Cos(A)*(1-.5*Cos(B)^2)
Y=350*Sin(A)*(1-.5*Cos(B)^2)
R=400*(.005+.1*(Sin((52*Pi*L)/T))^4)
For K=0 To 2*Pi Step Pi/R/1.5
  Pixel 650+X+Cos(K)*R,360+Y+Sin(K)*R
Next K
Next L
 
Posted: 05:18pm
27 Sep 2024
Copy link to clipboard
javavi
Guru


  Sasquatch said  Modified for HDMI Widescreen Mode 1

Edited 2024-09-28 03:22 by javavi
 
Posted: 07:39pm
27 Sep 2024
Copy link to clipboard
stanleyella
Guru


probably irrelevant ..continuous line

Edited 2024-09-28 05:40 by stanleyella
 
Posted: 04:41am
28 Sep 2024
Copy link to clipboard
javavi
Guru


  stanleyella said  probably irrelevant ..

The only thing that matters here is what can be run on PicoMite  
 
Posted: 05:35pm
29 Sep 2024
Copy link to clipboard
javavi
Guru


Red Chinese Procedural Dragon

MODE 2
Dim GCOL(3)=(RGB(YELLOW),RGB(RED),RGB(BLACK),RGB(WHITE))
S=Sin(.03):C=Cos(.03):X=260:Y=20:U=0:V=1
For A=80 To 1200
X=X+U:Y=Y+V:K=Sgn(Cos(A/45)*Cos(A*.0138))
T=U:U=U*C-K*V*S:V=V*C+K*T*S:Z=24-A Mod 10
For B=-Z To Z
R=1-80/A
CI=1+(Int(3*Abs(Cos(B*.3+(A\4 Mod 2)*Pi/2+.4)))=A Mod 4)-(Abs(B)>16)
Colour GCOL(CI)
Pixel 1*Int(X+R*B*V),250-1*(Y-R*B*U)
Next :Next
K=190
For J=0 To K
R=(200-80*Cos(J*3*Pi/K))*(.8+.5*Cos(J*13*Pi/K)*Cos(J*13*Pi/K))
For I=0 To R Step 5
CI=1.2-(I/R)-(J\20=4)*(2*(I\15=3)+1)-(J\12=14)*(I\30=3)
Colour GCOL(Abs(CI))
S=Sin(J*Pi/K):C=Cos(J*Pi/K):V=8*Sin(I/16)
Pixel 160+(I*S+V*C)/4,70-(I*C+V*S)/4
Pixel 160-(I*S+V*C)/4,70-(I*C+V*S)/4
Next : Next
 
Posted: 09:17pm
29 Sep 2024
Copy link to clipboard
stanleyella
Guru


impressive, code worked olimex pico2 hdmi modes 1 to 5. like
 
Posted: 07:17am
30 Sep 2024
Copy link to clipboard
electricat
Senior Member


  Quote  Red Chinese Procedural Dragon


Hmmm... looks interesting. But at closer look it is sure mathematics and associations.

Now, I`m curious, if we would show AI some random raster photo and ask to describe that photo in mathematical formulas ??    I beleieve it would do that. Question only how effective it would be done.
 
Posted: 07:35am
30 Sep 2024
Copy link to clipboard
Martin H.
Guru


  javavi said  Red Chinese Procedural Dragon

looks very good   but I don't even try to understand the code
 
Posted: 12:17pm
30 Sep 2024
Copy link to clipboard
lizby
Guru

  electricat said  
  Quote  Red Chinese Procedural Dragon


Now, I`m curious, if we would show AI some random raster photo and ask to describe that photo in mathematical formulas ??


Or ask it to write MMBasic code to produce the image--that might be interesting (or maybe it would just find this thread and show javavi's code).
 
Posted: 12:35am
01 Oct 2024
Copy link to clipboard
javavi
Guru


Lorenz Attractor
Lorenz_System


MODE 1
x=3.051522: y=1.582542: z=15.62388
dt=0.04: a=5: b=15: c=1
Do
 x1=x+a*(-x+y)*dt
 y1=y+(b*x-y-z*x)*dt
 z1=z+(-c*z+x*y)*dt
 x=x1: y=y1: z=z1
 px=Int(29*(y-x*.2)+320)
 py=Int(-15*(z+x*.2)+460)
 Pixel px,py
Loop
 
Posted: 06:49am
01 Oct 2024
Copy link to clipboard
Malibu
Senior Member

  Quote  Now, I`m curious, if we would show AI some random raster photo and ask to describe that photo in mathematical formulas ??     I beleieve it would do that. Question only how effective it would be done.


An interesting video about AI and image generation (Maybe not completely answering your question for mathmatics, but fascinating none the less)

Steve Mould - This new type of illusion is really hard to make

Well explained and a good watch  
 
Posted: 03:51pm
01 Oct 2024
Copy link to clipboard
javavi
Guru


Sierpinski Triangle
WikipediA

MODE 1
RX=MM.HRes:RY=MM.VRes:CX=RX\2:CY=RX\2

Do
 rs=Int(Rnd(1)*3)
 If rs=1 Then
   fx=CX:fy=0
 ElseIf rs=2 Then
   fx=0:fy=RY
 Else
   fx=RX:fy=RY
 EndIf
 x=(x+fx)\2
 y=(y+fy)\2
 Pixel x,y
Loop Until Inkey$<>""

Edited 2024-10-02 01:52 by javavi
 
Posted: 05:08pm
03 Oct 2024
Copy link to clipboard
javavi
Guru


Star

MODE 2
RX=MM.HRes:RY=MM.VRes:CX=RX\2:CY=RY\2
RR1=150:RR2=-50:RR3=30:K=0.45:Q=0.1

For R1=RR1 To 187 Step 5
 For R2=RR2 To 240 Step 5
   Q=Rnd*2
   For R3=RR3 To 240 Step 5
     COL=Int(Rnd*&hFFFFFF)
     For T=0 To 600 Step Q
       X=Int((R1+R2)*Cos(R2*T/R1)-R3*Cos((R1+R2)/R1*T))
       Y=Int((R1+R2)*Sin(R2*T/R1)-R3*Sin((R1+R2)/R1*T))
       Pixel X*K+CX, Y*K+CY, COL
     Next T
   Next R3
   Pause 1000: CLS
 Next R2
Next R1
End
 
Posted: 03:45pm
07 Oct 2024
Copy link to clipboard
javavi
Guru


💈 Barber Pole 💈

ch=32:bc=0
Do
 For x=0 To 79
   Print Chr$(ch);
   TILE x,39,,Co(bc)
   Inc ch: If ch>111 Then ch=32
   Inc bc: bc=bc And 15
 Next x
 Inc bc: bc=bc And 15
Loop

Function CO(n)
CO=n And 1 Or ((n And 6)<<6) Or ((n And 8)<<13)
CO=CO<<7
End Function
 
Posted: 04:05pm
10 Oct 2024
Copy link to clipboard
javavi
Guru


EPICYCLOID

RX=MM.HRes:RY=MM.VRes:CX=RX\2:CY=RY\2
R1=111:R2=16:R3=131:K=CY/270

For Q=1 To 0 Step -0.01
 CLS
 For T=0 To 600 Step Q
   X=Int((R1+R2)*Cos(R2*T/R1)-R3*Cos((R1+R2)/R1*T))
   Y=Int((R1+R2)*Sin(R2*T/R1)-R3*Sin((R1+R2)/R1*T))
   Pixel X*K+CX, Y*K+CY
 Next T
Next Q
End
 
Posted: 04:15pm
10 Oct 2024
Copy link to clipboard
stanleyella
Guru


you got to run it to appreciate it
 
Posted: 04:45pm
10 Oct 2024
Copy link to clipboard
Sasquatch
Guru


Nice,

Does anyone else remember the "Spirograph" toy?  Or was that just in the US?  I recently saw a new one in the store, seems they are trying to bring it back. I doubt that kids these days would find it nearly as interesting as we did back in the day!

Edit:  I see here that it was invented by a British engineer.  So I assume it was sold worldwide?

https://en.wikipedia.org/wiki/Spirograph


Edited 2024-10-11 02:54 by Sasquatch
 
Posted: 05:02pm
10 Oct 2024
Copy link to clipboard
Mixtel90
Guru


Oh yes! I had a Spirograph many, many years ago. This was when it came in a red box and all the parts were clear, non-tinted plastic. It was supplied with 4 ballpoint pens that tended to leak after a while!. I think I still have a set somewhere, a similar one but probably not the original. No fancy storage case. :(
 
Posted: 05:10pm
10 Oct 2024
Copy link to clipboard
javavi
Guru


  Sasquatch said  Does anyone else remember the "Spirograph" toy?


SPIROGRAPH.zip
 
   Page 3 of 8    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025