Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' REM Final Master 3D Shape Demo Finished 2014-01-16
- ' REM Coded for miSoft.com Basic! 3.8.2 [email protected]
- ' REM Shapes from 80 Microcomputing, May 1981
- off_x = ScreenWidth/4
- off_y = ScreenHeight/4
- '5 # 4 Leaf Rose-Template
- '6 uses polar coordinates and is based on four leaf ros
- 'NEW
- i = 42
- ' REM clear screen
- CLS
- FOR t = 0 TO 2* PI STEP PI/75
- r=COS (2*t)*175
- x1=COS(t)*r+80+off_x
- y1=SIN(t)*r+80+off_y
- a=t+PI/3
- r2=COS(2*a)*175
- x2=COS(a)*r2+80+off_x
- y2=SIN(a)*r2+80+off_y
- LINE x1,y1,x2,y2
- NEXT t
- REM SLEEP 2
- PAUSE "Tap screen for next sample"
- CLS
- x = 33
- '# Disk made with lines
- i = 42
- FOR t = 0 TO 2* PI STEP PI/50 '40 is density
- x1=COS(t)*160+80+off_x '150 is size and 80 is position of center
- y1=SIN(t)*160+80+off_y
- a=t+3*PI/4 'fractions of pi will give you the relative size of the innwr and outer circles
- x2=COS(a)*160+80+off_x
- y2=SIN(a)*160 +80 +off_y
- LINE X1,Y1,X2,Y2
- NEXT t
- PAUSE "Tap screen for next sample"
- ' REM SLEEP 2
- CLS
- x = 33
- '# Box
- ' rem figure is made complete of square
- i = 42
- FOR t = 0 TO 2* PI STEP PI/30
- '30 is doubled number of boxes 30 corresponds to 15 boxes
- r=COS(2*t)*170
- x1=COS(t)*r+80+off_x
- y1=SIN(t)*r+80+off_y
- a=t+ PI/2
- r2=COS(2*a)*170
- x2=COS(a)*r2+80+off_x
- y2=SIN(a)*r2+80+off_y
- LINE X1,Y1,X2,Y2
- NEXT t
- PAUSE "Tap screen for next sample"
- 'REM SLEEP 2
- CLS
- x = 33
- '# Outward Triangles
- ' rem figure made of triangs fig 10 page 144 80 Microcomputing May 1981
- i = 42
- FOR t=0 TO 1*PI STEP PI/30
- ' REM 30 is density (number of triangles)
- r=t*60
- ' REM this 60 gives you size of triangle
- x1=COS(t)*r+100+off_x
- y1=SIN(t)*r+100+off_y
- a=t+(2*PI/3)
- x2=COS(a)*r+100+off_x
- y2=SIN(a)*r+100+off_y
- LINE x1,y1,x2,y2
- b=t+(4*PI/3)
- x1=COS(b)*r+100+off_x
- y1=SIN(b)*r+100+off_y
- LINE x1,y1,x2,y2
- x2=COS(t)*r+100+off_x
- y2=SIN(t)*r+100+off_y
- LINE x1,y1,x2,y2
- NEXT t
- PAUSE "Tap screen for next sample"
- ' REM SLEEP 2
- CLS
- x = 33
- ' REM wait for input
- 'RUN
- '# Cyclone Spiral w/ lines
- 'rem overlapping sprial made of 200 lines
- i = 42
- ' REM clear screen
- 'FOR t = 0 TO 15*PI STEP PI/20
- x1=COS(t)*5*t+80+off_x
- y1=SIN(t)*5*t+80+off_y
- a=t+2*PI/3
- x2=COS(a)*5*a+80+off_x
- y2=SIN(a)*5*a+80+off_y
- LINE x1,y1,x2,y2
- NEXT t
- PAUSE "Tap screen for next sample"
- 'REM SLEEP 2
- CLS
- x = 33
- '# 8 Leaf Rose
- 'REM this is based on an eight leaf rose ; the small star in the center was an accident
- i = 42
- FOR t=0 TO 2*PI STEP PI/60
- r=COS(4*t)*200
- x1=COS(t)*r+80+off_x
- y1=SIN(t)*r+80+off_y
- a=t+PI/4
- r2=COS(4*a)*200
- x2=COS(a)*r2+80+off_x
- y2=SIN(a)*r2+80+off_y
- LINE x1,y1,x2,y2
- NEXT t
- PAUSE "Tap screen for next sample"
- 'REM SLEEP 2
- CLS
- x = 33
- '# Inward Triangles
- r=1
- i = 42
- 'REM clear screen
- FOR t=0 TO 3.64 STEP PI/30
- r=r*1.17557
- x1=COS(t)*r+80+off_x
- y1=SIN(t)*r+80+off_y
- a=t+(2*PI/3)
- x2=COS(a)*r+80+off_x
- y2=SIN(a)*r+80+off_y
- LINE x1,y1,x2,y2
- b=t+(4*PI/3)
- x1=COS(b)*r+80+off_x
- y1=SIN(b)*r+80+off_y
- LINE x1,y1,x2,y2
- x2=COS(t)*r+80+off_x
- y2=SIN(t)*r+80+off_y
- LINE x1,y1,x2,y2
- NEXT t
- PAUSE "Tap screen for next sample"
- 'REM SLEEP 2
- CLS
- x = 33
- '#figure 1 (a CIRCLE with internal connecting lines) then a string art border
- i = 42
- INPUT"number of points (sample has 18) ",n
- DIM a(n), b(n)
- FOR t =0 TO 2*PI-.001 STEP 2*PI/n
- z=z+1
- 'REM PRINT z
- a(z)=COS(t)*100+80
- b(z)=SIN(t)*100+80
- NEXT t
- FOR s=1 TO n-1
- FOR d=s+1 TO n
- x1=a(s)+75
- y1=b(s)+75
- x2=a(d)+75
- y2=b(d)+75
- LINE x1,y1,x2,y2
- NEXT d
- NEXT s
- x = 33
- '# Parabola string art border
- i = 42
- FOR q= 5 TO 300 STEP 9
- x1=5
- y1=q
- x2=q
- y2=300
- LINE x1,y1,x2,y2
- x1=q
- y1=5
- x2=300
- y2=q
- LINE x1,y1,x2,y2
- NEXT q
- PAUSE "Tap screen for next sample"
- 'REM SLEEP 2
- CLS
- z = 0
- INPUT"number of points (sample has 18) ",n
- DIM a(n+1), b(n+1)
- FOR t =0 TO 2*PI-.001 STEP 2*PI/n
- z=z+1
- a(z)=COS(t)*180+80
- b(z)=SIN(t)*180+80
- NEXT t
- FOR s=1 TO n-1
- FOR d=s+1 TO n
- x1=a(s)+off_x
- y1=b(s)+off_y+25
- x2=a(d)+off_x
- y2=b(d)+off_y+25
- LINE x1,y1,x2,y2
- NEXT d
- NEXT s
- PAUSE "Tap screen for next sample"
- 'REM SLEEP 2
- CLS
- '# The tunnel
- x1=80
- y1=80
- FOR t=1 TO 64
- x2=x1+(5*t)+2
- y2=y1
- LINE x1,y1,x2,y2
- x1=x2
- y1=y2+(5*t)+3
- LINE x1,y1,x2,y2
- x2=x1-(5*t)-5
- y2=y1
- LINE x1,y1,x2,y2
- x1=x2
- y1=y2-(5*t)-6
- LINE x1,y1,x2,y2
- NEXT t
- PAUSE "Tap screen for next sample"
- 'REM moire pattern
- CLS
- FOR tt = 0 TO PI STEP PI/180
- x1=100*COS(tt)
- y1=100*SIN(tt)
- x2=300*COS(tt)
- y2=300*SIN(tt)
- LINE x1,y1,x2,y2
- x1=300-x1
- y1=300-y1
- x2=300-x2
- y2=300-y2
- LINE x1,y1,x2,y2
- NEXT tt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement