> | restart: with (plots): |
Warning, the name changecoords has been redefined
> | # Define some constant params.
myParams := style=PATCHNOGRID, scaling=CONSTRAINED, axes=NONE, lightmodel=light4, light=[75, 25, .9, .9, .9], projection=ORTHOGONAL, transparency=0.0; |
> | # Use this to set resolution!
ptsFactor := 100: |
> | CreateObject := proc (stmt, xmin, xmax, ymin, ymax, zmin, zmax, _numpoints, _color)
return implicitplot3d ( stmt, x=xmin..xmax, y=ymin..ymax, z=zmin..zmax, numpoints=_numpoints*ptsFactor, color=_color, myParams ): end proc: |
> | nose := CreateObject (
((x+2.5)*2)^2-(y+4.5)^3=((z+2.3)*0.75)^2, -3.5, -1.5, -5.5, -3.5, -3.3, -2.3, 12, COLOR (RGB, 1, 0.85, 0.75) ): |
> | skull := CreateObject (
(x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2^2, -4.5, -0.5, -4.5, -2.0, -4.5, -0.5, 20, COLOR (RGB, 1, 0.9, 0.8) ), CreateObject ( (x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2^2, -4.5, -0.5, -2.0, -0.5, -4.5, -3.0, 20, COLOR (RGB, 1, 0.9, 0.8) ): |
> | lefteyesocket := CreateObject (
((x+3.25)^2/0.2)+((y+4.25)^2/0.1)+((z+2)^2/0.1)=1, -4.25, -2.25, -5.25, -3.25, -3, -1, 6, COLOR (RGB, 1, 1, 1) ): |
> | lefteyeball := CreateObject (
(x+3.25)^2 + (y+4.5)^2 + (z+2)^2 = 0.2^2, -3.55, -3.05, -4.7, -4.3, -3, -1, 4, COLOR (RGB, 0.1, 0.2, 0.9) ): |
> | righteyesocket := CreateObject (
((x+1.75)^2/0.2)+((y+4.25)^2/0.1)+((z+2)^2/0.1)=1, -2.75, -0.75, -5.25, -3.25, -3, -1, 6, COLOR (RGB, 1, 1, 1) ): |
> | righteyeball := CreateObject (
(x+1.75)^2 + (y+4.5)^2 + (z+2)^2 = 0.2^2, -2.05, -1.55, -4.7, -4.3, -3, -1, 4, COLOR (RGB, 0.1, 0.2, 0.9) ): |
> | hat := CreateObject (
(x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2.1^2, -4.5, -0.5, -4.5, -0.5, -1.6, -1.2, 2, COLOR (RGB, 1.0, 0.0, 0.0) ), CreateObject ( (x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2.1^2, -4.5, -0.5, -4.5, -0.5, -1.2, -1.0, 2, COLOR (RGB, 0.0, 0.0, 1.0) ), CreateObject ( (x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2.1^2, -4.5, -0.5, -4.5, -0.5, -1.0, -0.8, 2, COLOR (RGB, 0.0, 1.0, 0.0) ), CreateObject ( (x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2.1^2, -4.5, -0.5, -4.5, -0.5, -0.8, -0.6, 2, COLOR (RGB, 1.0, 0.0, 0.0) ), CreateObject ( (x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2.1^2, -4.5, -0.5, -4.5, -0.5, -0.6, -0.5, 2, COLOR (RGB, 0.0, 1.0, 0.0) ), CreateObject ( (x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2.1^2, -4.5, -0.5, -4.5, -0.5, -0.5, -0.45, 2, COLOR (RGB, 0.0, 0.0, 1.0) ), CreateObject ( (x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2.1^2, -4.5, -0.5, -4.5, -0.5, -0.45, -0.4, 2, COLOR (RGB, 0.0, 1.0, 0.0) ): |
> | pompom := CreateObject (
(x+2.5)^2 + (y+2.5)^2 + (z+0.3)^2 = 0.3^2, -2.8, -2.2, -2.8, -2.2, -0.6, 0.0, 1, COLOR (RGB, 0.5, 0.2, 0.8) ): |
> | neck := CreateObject (
(x+2.5)^2+(y+2.5)^2=1.2^2, -4.5, -.5, -4.5, -.5, -6, -3.75, 4, COLOR (RGB, 1, 0.9, 0.8) ): |
> | leftear := CreateObject (
((y+2.5)*2)^2-(x+4.0)^3=((z+1.8)*0.75)^2, -5.0, -3.0, -3.5, -1.5, -2.8, -1.8, 12, COLOR (RGB, 1, 0.85, 0.75) ), CreateObject ( ((y+2.5)*2)^2-(x+4.0)^3=((z+1.7)*0.75)^2, -5.0, -3.0, -3.5, -1.5, -2.7, -1.7, 12, COLOR (RGB, 1, 0.85, 0.75) ), CreateObject ( ((y+2.5)*2)^2-(x+4.0)^3=((z+1.6)*0.75)^2, -5.0, -3.0, -3.5, -1.5, -2.6, -1.6, 12, COLOR (RGB, 1, 0.85, 0.75) ): |
> | rightear := CreateObject (
((y+2.5)*2)^2+(x+1)^3=((z+1.8)*0.75)^2, -2., 0, -3.5, -1.5, -2.8, -1.8, 12, COLOR (RGB, 1, 0.85, 0.75) ), CreateObject ( ((y+2.5)*2)^2+(x+1)^3=((z+1.7)*0.75)^2, -2., 0, -3.5, -1.5, -2.7, -1.7, 12, COLOR (RGB, 1, 0.85, 0.75) ), CreateObject ( ((y+2.5)*2)^2+(x+1)^3=((z+1.6)*0.75)^2, -2., 0, -3.5, -1.5, -2.6, -1.6, 12, COLOR (RGB, 1, 0.85, 0.75) ): |
> | hair := CreateObject (
(x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2^2, -4.5, -0.5, -2.0, -0.5, -3.0, -0.5, 8, COLOR (RGB, 0.0, 0.0, 0.0) ): |
> | mouth := CreateObject (
(x+2.5)^2+(y+2.5)^2+(z+2.5)^2=2.05^2, -3.2, -1.8, -4.5, -2.0, -3.8, -3.6, 4, COLOR (RGB, 1.0, 0.0, 0.0) ): |
> | display (skull, nose, lefteyesocket, lefteyeball, righteyesocket, righteyeball, hat, pompom, neck, leftear, rightear, hair, mouth); |
> |
> |