Sunday, October 23, 2022

Make Your Own Maurer Rose Patterns

Maurer Rose patterns based on slightly modified code I posted the other day

This version allows you to input the values for N and D.  Then it displays the results, and waits for a keypress.  Once you hit a key it will return to the text screen and ask for new values.

Here are a couple examples:
 

Values 2,29

 


Values 6,71




0 POKE65497,0:SX=144:SY=56:SZ=64:CX=320:CY=192

5 HSCREEN0:INPUT"ENTER VALUES FOR N,D";N,D

6 IF N=0 OR D=0 THEN 5

REM XO,YO = ORIGIN
10 XO=160:YO=96:PI=22/7:HSCREEN 2


REM DW = DRAW WIDTH
REM T=THETA
20 DW = 1 : HCOLOR 14
30 FOR T = 0 TO 360
40   K = T * D * PI / 180
50   R = 96 * SIN(N * K)
60   X = XO - R * COS(K)
70   Y = YO - R * SIN(K)
80   HLINE-(X, Y),PSET
90 NEXT

100 IF INKEY$="" THEN 100 ELSE 5
 



Saturday, October 22, 2022

Archimedean Spiral

Archimedean Spiral



 0 POKE65497,0:SX=144:SY=56:SZ=64:CX=320:CY=192:HSCREEN 2

10 A=1.5
20 B=1.5
30 PI=3.141592

40 HSET(160,96)

50 FOR T=0 TO 15*PI STEP .1
60  R=A+B*T  
70  HLINE-(160+2*R*SIN(T),96+R*COS(T)),PSET
80 NEXT

100 GOTO 100

Maurer Rose Pattern

Just one of many Maurer Rose Patterns that are possible.

 

 

 0 POKE65497,0:SX=144:SY=56:SZ=64:CX=320:CY=192:HSCREEN 2

REM 1 DIM R(CX):FOR I=0 TO CX:R(I)=CY:NEXT I:GOTO 10

REM XO,YO = ORIGIN
10 N=7:D=29:XO=160:YO=95:PI=22/7

REM DW = DRAW WIDTH
REM T=THETA
20 DW = 1 : HCOLOR 7
30 FOR T = 0 TO 360
40   K = T * D * PI / 180
50   R = 98 * SIN(N * K)
60   X = XO - R * COS(K)
70   Y = YO - R * SIN(K)
80   HLINE-(X, Y),PSET
90 NEXT
 
100 DW = 2 : HCOLOR 3
110 FOR T = 0 TO 360
120   K = T * PI / 180
130   R = 98 * SIN(N * K)
140   X = XO + R * COS(K)
150   Y = YO - R * SIN(K)
160   HLINE -(X, Y),PSET
170 NEXT
180 GOTO 180