Draw a sphere: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: elided a duplicated line. |
|||
Line 3,966: | Line 3,966: | ||
dot=s1*v1 + s2*v2 + s3*v3 /*the dot product of the Vs*/ |
dot=s1*v1 + s2*v2 + s3*v3 /*the dot product of the Vs*/ |
||
if dot>0 then dot=0 /*if positive, make it zero*/ /*◄■■■■ same as: dot=max(0, dot) */ |
if dot>0 then dot=0 /*if positive, make it zero*/ /*◄■■■■ same as: dot=max(0, dot) */ |
||
if dot>0 then dot=0 /*if positive, make it zero*/ |
|||
b=-dot**k + ambient /*calculate the brightness.*/ |
b=-dot**k + ambient /*calculate the brightness.*/ |
||
if b<=0 then brite=shadeLen |
if b<=0 then brite=shadeLen |