Draw a cuboid: Difference between revisions

Content deleted Content added
m added a Wikepedia (URL) link in the task's preamble.
→‎{{header|POV-Ray}}: Add Processing section
Line 2,361: Line 2,361:


[[FILE:PovRay-cuboid.jpg‎]]
[[FILE:PovRay-cuboid.jpg‎]]

=={{header|Processing}}==
A cuboid in Processing is created with box(). It may be styled with stroke, fill, and lighting.

<lang Processing>size(500, 500, P3D);
background(0);
// position
translate(width/2, height/2, -width/2);
rotateZ(radians(15));
rotateY(radians(-30));
rotateX(radians(-25));
// optional fill and lighting colors
noStroke();
fill(192, 255, 192);
pointLight(255, 255, 255, 400, -400, 400);
// draw box
box(200, 300, 400);</lang>


=={{header|Prolog}}==
=={{header|Prolog}}==