Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "colors.inc"
- #include "PolyhedronKit.inc"
- #declare light=<1, 0, 0> * 2;
- #declare light=<1, 1, 1> * 1.3;
- background {color White}
- camera {location light look_at <0, 0, 0>}
- //camera {location <-5, 0, 0> look_at <0, 0, 0>}
- light_source {light color White}
- light_source {<0, 0, 0> color White}
- #macro triBifrusta(xrot, yrot, zrot, thick, ocolor)
- #declare height = .6;
- #declare bwidth = 1;
- #declare swidth = .75;
- // Main axis points
- #declare p1 = <0, 0, .577 * bwidth>;
- #declare p2 = <-.5 * bwidth, 0, -.289 * bwidth>;
- #declare p3 = <.5 * bwidth, 0, -.289 * bwidth>;
- // Positive axis points
- #declare p4 = <0, height, .577 * swidth>;
- #declare p5 = <-.5 * swidth, height, -.289 * swidth>;
- #declare p6 = <.5 * swidth, height, -.289 * swidth>;
- // Negative axis points
- #declare p7 = <0, -height, .577 * swidth>;
- #declare p8 = <-.5 * swidth, -height, -.289 * swidth>;
- #declare p9 = <.5 * swidth, -height, -.289 * swidth>;
- // Trying to keep a constant width for ease of folding
- #declare pwidth=.05;
- // Upper then lower triangular faces
- #declare triAngle=0;
- otriangle(p4, p5, p6, triAngle, pwidth, <xrot, yrot, zrot>, ocolor, true)
- otriangle(p7, p8, p9, triAngle, pwidth, <xrot, yrot, zrot>, ocolor, false)
- // Upper then lower trapezoidal faces
- #declare trapAngle=0;
- oquad(p1, p2, p5, p4, trapAngle, pwidth, <xrot, yrot, zrot>, ocolor, false)
- oquad(p2, p3, p6, p5, trapAngle, pwidth, <xrot, yrot, zrot>, ocolor, false)
- oquad(p3, p1, p4, p6, trapAngle, pwidth, <xrot, yrot, zrot>, ocolor, false)
- oquad(p1, p2, p8, p7, trapAngle, pwidth, <xrot, yrot, zrot>, ocolor, false)
- oquad(p2, p3, p9, p8, trapAngle, pwidth, <xrot, yrot, zrot>, ocolor, false)
- oquad(p3, p1, p7, p9, trapAngle, pwidth, <xrot, yrot, zrot>, ocolor, false)
- #end
- //triBifrusta(0, 0, 0, .1, Orange)
- triBifrusta(30, 35.2644, 45, .1, Orange)
- triBifrusta(-30, -35.2644, 45, .1, Magenta)
- triBifrusta(30, 35.2644, -45, .1, Green)
- triBifrusta(-30, -35.2644, -45, .1, Yellow)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement