Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Draw-a-sphere/Run-BASIC/draw-a-sphere-1.basic
Normal file
18
Task/Draw-a-sphere/Run-BASIC/draw-a-sphere-1.basic
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
'Run BASIC White Sphere, Black background
|
||||
'runbasic.com
|
||||
graphic #win, 300, 300
|
||||
#win size(1)
|
||||
R=100
|
||||
R2=R*R
|
||||
X0=300/2
|
||||
Y0=300/2
|
||||
for Y = -150 to 150
|
||||
for X = -150 to 150
|
||||
D2 = X*X + Y*Y
|
||||
C = 0
|
||||
if D2 <= R2 then Z = sqr(R2-D2) : C = int(Z-(X+Y)/2+130)
|
||||
#win color(C,C,C)
|
||||
#win set(X+X0, Y+Y0)
|
||||
next X
|
||||
next Y
|
||||
render #win
|
||||
5
Task/Draw-a-sphere/Run-BASIC/draw-a-sphere-2.basic
Normal file
5
Task/Draw-a-sphere/Run-BASIC/draw-a-sphere-2.basic
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
'This is a simple Circle
|
||||
graphic #g, 300, 300 'create a graphic object
|
||||
#g place(100,100) 'place the drawing pen at 100,100
|
||||
#g circle(75) 'make a circle with radius 75
|
||||
render #g 'show it
|
||||
Loading…
Add table
Add a link
Reference in a new issue