A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
1
Task/Draw-a-sphere/J/draw-a-sphere-1.j
Normal file
1
Task/Draw-a-sphere/J/draw-a-sphere-1.j
Normal file
|
|
@ -0,0 +1 @@
|
|||
load 'system/examples/graphics/opengl/simple/sphere.ijs'
|
||||
8
Task/Draw-a-sphere/J/draw-a-sphere-2.j
Normal file
8
Task/Draw-a-sphere/J/draw-a-sphere-2.j
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
'R k ambient' =. 10 2 0.4
|
||||
light =. (% +/&.:*:) 30 30 _50
|
||||
pts =. (0&*^:(0={:))@:(,,(0>.(*:R)-+)&.*:)"0/~ i:15j200
|
||||
luminosity =. (>:ambient) %~ (ambient * * +/&.:*:"1 pts) + k^~ 0>. R%~ pts +/@:*"1 -light
|
||||
|
||||
load 'viewmat'
|
||||
togreyscale =. 256 #. [: <. 255 255 255 *"1 0 ]
|
||||
'rgb' viewmat togreyscale luminosity
|
||||
26
Task/Draw-a-sphere/Liberty-BASIC/draw-a-sphere.liberty
Normal file
26
Task/Draw-a-sphere/Liberty-BASIC/draw-a-sphere.liberty
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
WindowWidth =420
|
||||
WindowHeight =460
|
||||
|
||||
nomainwin
|
||||
|
||||
open "Sphere" for graphics_nsb_nf as #w
|
||||
|
||||
#w "down ; fill lightgray"
|
||||
|
||||
xS =200
|
||||
yS =200
|
||||
for radius =150 to 0 step -1
|
||||
level$ =str$( int( 256 -256 *radius /150))
|
||||
c$ =level$ +" " +level$ +" " +level$
|
||||
#w "color "; c$
|
||||
#w "backcolor "; c$
|
||||
#w "place "; xS; " "; yS
|
||||
xS =xS -0.5
|
||||
yS =yS -0.2
|
||||
#w "circlefilled "; radius
|
||||
next radius
|
||||
|
||||
#w "flush"
|
||||
wait
|
||||
close #w
|
||||
end
|
||||
5
Task/Draw-a-sphere/Logo/draw-a-sphere.logo
Normal file
5
Task/Draw-a-sphere/Logo/draw-a-sphere.logo
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
to sphere :r
|
||||
cs perspective ht ;making the room ready to use
|
||||
repeat 180 [polystart circle :r polyend down 1]
|
||||
polyview
|
||||
end
|
||||
1
Task/Draw-a-sphere/Mathematica/draw-a-sphere.mathematica
Normal file
1
Task/Draw-a-sphere/Mathematica/draw-a-sphere.mathematica
Normal file
|
|
@ -0,0 +1 @@
|
|||
Graphics3D[Sphere[{0,0,0},1]]
|
||||
11
Task/Draw-a-sphere/Maxima/draw-a-sphere.maxima
Normal file
11
Task/Draw-a-sphere/Maxima/draw-a-sphere.maxima
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/* Two solutions */
|
||||
plot3d(1, [theta, 0, %pi], [phi, 0, 2 * %pi],
|
||||
[transform_xy, spherical_to_xyz], [grid, 30, 60],
|
||||
[box, false], [legend, false])$
|
||||
|
||||
load(draw)$
|
||||
draw3d(xu_grid=30, yv_grid=60, surface_hide=true,
|
||||
parametric_surface(cos(phi)*sin(theta),
|
||||
sin(phi)*sin(theta),
|
||||
cos(theta),
|
||||
theta, 0, %pi, phi, 0, 2 * %pi))$
|
||||
Loading…
Add table
Add a link
Reference in a new issue