Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:31 23 Oct 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 4 of 4    
Author Message
stanleyella

Guru

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

remember etch a sketch? https://www.ebay.co.uk/itm/286063259141
I had one as a kid, it was crap
 
Mixtel90

Guru

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

They are more fun when you attach stepper motors to the knobs. :)
Mick

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

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 154
Posted: 04:52am 11 Oct 2024
Copy link to clipboard 
Print this post

Spirograph in monochrome & colour mode (1,2)
under .MOD music for your meditations :))


SPIROGRAPH.zip
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1095
Posted: 07:53am 11 Oct 2024
Copy link to clipboard 
Print this post

La Linea

CLS
Restore lalinea
n=1
Read x1,y1
Do
Read x2,y2:Inc n:If x2=0 Then Exit
If y2=255 Then Read x1,y1,x2,y2:Inc n,2
Line x1,y1,x2,y2:Line x1+1,y1,x2+1,y2:Line x1,y1+1,x2,y2+1
x1=x2:y1=y2
Loop
'Print n
LaLinea:
Data 1,149,46,149,1,255,90,149,112,149,112,136,111,119,110,105,106,89
Data 73,104,72,113,70,119,68,125,67,126,65,123,63,122,64,119,61,118
Data 62,113,65,106,60,106,58,102,65,102,104,78,100,73,99,70,99,65,101,61
Data 104,55,113,48,119,44,125,41,130,40,131,43,131,47,129,50,124,54,118,57
Data 125,57,122,63,121,67,121,76,124,80,127,79,130,74,131,71,132,71,134,76
Data 139,77,149,82,151,84,151,88,147,100,144,104,146,107,148,104,150,108
Data 149,110,150,108,153,109,152,112,149,115,153,121,152,124,150,123,144,117
Data 143,135,142,144,140,149,223,149

Data 0,0

'no comment
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 154
Posted: 12:48pm 11 Oct 2024
Copy link to clipboard 
Print this post

  Martin H. said  La Linea

La BuBla Owl

NX=18:NY=21
CSIZE=MM.VRes\(NY+2)
SX=(MM.HRes-CSIZE*NX)\2
SX=MM.HRes-SX-CSIZE\2
SY=(MM.VRes-CSIZE*NY)\2
SY=SY+CSIZE\2
R=CSIZE/1.3

Restore OWL
For IY=0 To NY-1
 Read D%
 For IX=0 To NX-1
   X=SX-IX*CSIZE
   Y=SY+IY*CSIZE
   If D% And 2^IX Then B=1 Else B=0
   If B Then Circle X,Y,R,,,0,1
 Next
Next
OWL:
Data &H15555,&H08282,&H11111,&H02828
Data &H11011,&H08282,&H14105,&H0A008
Data &H15551,&H0AA00,&H15501,&H0AA00
Data &H05501,&H02A80,&H01541,&H00AA0
Data &H00551,&H00228,&H00445,&H0AAA2
Data &H00001
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9006
Posted: 02:18pm 13 Oct 2024
Copy link to clipboard 
Print this post

Here is one modified from the CMM2 Welcome tape originally written by Sasquatch.
Will run as-is on RP2350 VGA or HDMI or change to mode 0 for RP2040 VGA (black and white)
The code should give you most (all?) of the tools needed to implement the other CMM2 turtle demos https://github.com/thwill1000/cmm2-welcome/tree/master/turtle




Option explicit
Option default none
Dim integer TurtlePenup=1,TurtlePenColour=MM.Info(fcolour)
Dim float TurtleDirection=0.0
Dim float TurtleX,TurtleY
MODE 3
Option angle degrees
Option console none
'
Text 0, 0, "Random Recursive Fractal Pine Tree", "", 2
Text 2, 25, "Press Q to Quit", "", 1
turtle.penup
turtle.move MM.HRes\2,400
turtle.pendown
PineTree 70,19
Do :Loop Until Inkey$="Q"
Save image "b:/pine"
'
Sub pinetree(l!,d!)
 If d!<0 Then Exit Sub
 Local a!=110+20*Rnd
 If l!>5 Then
   Turtle.pen.colour(139,69,19)
 Else
   turtle.pen.colour(0,100,0)
 EndIf
 turtle.forward l!
 pinetree l!*0.8, d!-1
 turtle.turn.right a!
 PineTree l! * 0.5, d! - 3
 turtle.turn.right 120
 PineTree l! * 0.5, d! - 3
 turtle.turn.right 240-a!
 turtle.penup
 turtle.backward l!
 turtle.pendown
End Sub
'
Sub turtle.move(x!, y!)
 If Not TurtlePenup Then Line TurtleX,TurtleY,x!,y!,1,TurtlePenColour
 TurtleX=x!
 TurtleY=y!
End Sub
'
Sub turtle.penup
 TurtlePenup=1
End Sub
'
Sub turtle.pendown
 TurtlePenup=0
End Sub
'
Sub turtle.turn.right(a!)
 Inc TurtleDirection,a!
 If TurtleDirection!>360.0 Then Inc TurtleDirection!,-360.0
End Sub
'
Sub turtle.turn.left(a!)
 Inc TurtleDirection,-a!
 If TurtleDirection!<0.0 Then Inc TurtleDirection!,360.0
End Sub
'
Sub turtle.backward(l!)
 Local x!=TurtleX-Sin(TurtleDirection!)*l!
 Local y!=TurtleY+Cos(TurtleDirection!)*l!
 If Not TurtlePenup Then Line TurtleX,TurtleY,x!,y!,1,TurtlePenColour
 TurtleX=x!
 TurtleY=y!
End Sub
'
Sub turtle.forward(l!)
 Local x!=TurtleX+Sin(TurtleDirection!)*l!
 Local y!=TurtleY-Cos(TurtleDirection!)*l!
 If Not TurtlePenup Then Line TurtleX,TurtleY,x!,y!,1,TurtlePenColour
 TurtleX=x!
 TurtleY=y!
End Sub
'
Sub turtle.pen.colour(r%,g%,b%)
 TurtlePenColour=(r%<<16) + (g%<<8) + b%
End Sub

Edited 2024-10-14 00:43 by matherp
 
javavi

Senior Member

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

The Black Hole Mystery

MODE 2: CLS
x0=MM.HRes/2: y0=MM.VRes/2
z =2

Do
 n=(Int(Rnd*7)+1)*7000+1000
 a=(Int(Rnd*18)+3)+10
 b=Int(Rnd*19)/10+0.1
 c=-(Int(Rnd*4)+1)*10
   For i=1 To 3
     Clr=Int(Rnd*&hFFFF00)+&hFF
     Tracery
   Next i
 Clr=0
 Tracery
Loop While Inkey$=""

Sub Tracery
x=x0: y=y0
For j=1 To n
 Pixel x+63, y+42, Clr
 u=y-Sgn(x-x0)*(Abs(b*(x-x0)-c))^1/z
 w=a-x+x0: x=u: y=w
Next j
End Sub

Edited 2024-10-21 03:16 by javavi
 
     Page 4 of 4    
Print this page


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

© JAQ Software 2024