HoloDraw Home | Documentation | Download | Examples | Frequently Asked Questions (FAQ)

Solid triangle in a box

Solid triangle in a box
This image is also available as: large/polybox.gif | large/polybox.png | polybox.iv | polybox.wrl | thumb/polybox.png

Script

Here's the Unix shell script that created this image:
(If you are using another operating system, and it does not have a sufficiently powerful scripting language, you may have to do some of these operations manually.)

#!/bin/sh
# filename:  polybox.sh
# author:    Marvin Simkin
# date:      2003-11-17
# purpose:   use HoloDraw to plot a solid triangle with a bounding box

# set the color for the bounding box to BLUE
echo "color=0 0 1" > blue.draw

# send the shape to drawbbox.pl to find the boundaries
# then send the color that you want the bounding box to be
cat polygon.draw blue.draw |

  # make a box around whatever is in polygon.draw
  drawbbox.pl > polybox.box

# combine the original drawing and the bounding box
cat polygon.draw polybox.box |

  # create a VRML 2 "world" file
  drawwrl.pl > polybox.wrl

# combine the original drawing and the bounding box
cat polygon.draw polybox.box |

  # create a VRML 1 "inventor" file
  drawiv.pl > polybox.iv

HoloDraw input file

Here's the HoloDraw input file that created this image:
(See the HoloDraw syntax documentation for details about what these keywords and values mean.)

# this is an example showing how to draw a polygon
# using three points, i.e. a filled triangle


# set the color for subsequent objects to ORANGE
color=1 0.6 0

# draw one ORANGE polygon with 3 points
polygon:0 0 0,3 4 5,3 2 1


Written by Marvin Simkin
Filename polybox.html
Last updated January 10, 2005
Arizona State University Valid HTML 4.01!
Freedom to Choose ANY Browser