This commit is contained in:
Ingy döt Net 2013-04-10 21:29:02 -07:00
parent 764da6cbbb
commit db842d013d
19005 changed files with 197040 additions and 7 deletions

View file

@ -0,0 +1 @@
load 'system/examples/graphics/opengl/simple/sphere.ijs'

View 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

View 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

View 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

View file

@ -0,0 +1 @@
Graphics3D[Sphere[{0,0,0},1]]

View 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))$