Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:48 24 Nov 2024 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 3 of 5    
Author Message
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 03:26pm 27 Sep 2024
Copy link to clipboard 
Print this post

  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
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 362
Posted: 05:02pm 27 Sep 2024
Copy link to clipboard 
Print this post

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

-Carl
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 05:18pm 27 Sep 2024
Copy link to clipboard 
Print this post

  Sasquatch said  Modified for HDMI Widescreen Mode 1

Edited 2024-09-28 03:22 by javavi
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2112
Posted: 07:39pm 27 Sep 2024
Copy link to clipboard 
Print this post

probably irrelevant ..continuous line

Edited 2024-09-28 05:40 by stanleyella
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 04:41am 28 Sep 2024
Copy link to clipboard 
Print this post

  stanleyella said  probably irrelevant ..

The only thing that matters here is what can be run on PicoMite  
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 05:35pm 29 Sep 2024
Copy link to clipboard 
Print this post

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
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2112
Posted: 09:17pm 29 Sep 2024
Copy link to clipboard 
Print this post

impressive, code worked olimex pico2 hdmi modes 1 to 5. like
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 161
Posted: 07:17am 30 Sep 2024
Copy link to clipboard 
Print this post

  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.
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 07:35am 30 Sep 2024
Copy link to clipboard 
Print this post

  javavi said  Red Chinese Procedural Dragon

looks very good   but I don't even try to understand the code
'no comment
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 12:17pm 30 Sep 2024
Copy link to clipboard 
Print this post

  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).
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 12:35am 01 Oct 2024
Copy link to clipboard 
Print this post

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
 
Malibu
Senior Member

Joined: 07/07/2018
Location: Australia
Posts: 228
Posted: 06:49am 01 Oct 2024
Copy link to clipboard 
Print this post

  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  
John
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 03:51pm 01 Oct 2024
Copy link to clipboard 
Print this post

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
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 05:08pm 03 Oct 2024
Copy link to clipboard 
Print this post

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
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 03:45pm 07 Oct 2024
Copy link to clipboard 
Print this post

💈 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
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 04:05pm 10 Oct 2024
Copy link to clipboard 
Print this post

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
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2112
Posted: 04:15pm 10 Oct 2024
Copy link to clipboard 
Print this post

you got to run it to appreciate it
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 362
Posted: 04:45pm 10 Oct 2024
Copy link to clipboard 
Print this post

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
-Carl
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6772
Posted: 05:02pm 10 Oct 2024
Copy link to clipboard 
Print this post

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. :(
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 203
Posted: 05:10pm 10 Oct 2024
Copy link to clipboard 
Print this post

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


SPIROGRAPH.zip
 
     Page 3 of 5    
Print this page
© JAQ Software 2024