POV-Ray : Newsgroups : povray.newusers : building a screw head Server Time
27 Nov 2024 05:28:04 EST (-0500)
  building a screw head (Message 1 to 3 of 3)  
From: Tabea
Subject: building a screw head
Date: 5 Apr 2003 06:50:05
Message: <web.3e8ec21356f9b3492b26ab750@news.povray.org>


thougt of was creating to boxes an rotate one and than make a csg but i get
eight edges.

very familar with technical things.

Tabea


Post a reply to this message

From: Christoph Hormann
Subject: Re: building a screw head
Date: 5 Apr 2003 07:07:02
Message: <3E8EC6E5.6F2790FA@gmx.de>
Tabea wrote:
> 


> thougt of was creating to boxes an rotate one and than make a csg but i get
> eight edges.

> very familar with technical things.

The include file 'shapes2.inc' that comes with POV-Ray contains a shape
named 'Hexagon' which should work for this purpose or at least shows how
this can be accomplished.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Alan Walkington
Subject: Re: building a screw head
Date: 6 Apr 2003 19:45:22
Message: <3e90bc12$1@news.povray.org>
"Tabea" <hio### [at] webde> wrote in message
news:web.3e8ec21356f9b3492b26ab750@news.povray.org...

tried

i
> thougt of was creating to boxes an rotate one and than make a csg but i
get
> eight edges

Yeah, you would, wouldn't you.
Here is an octagon head, and a hex head.  They are very basic, but should
give you something to start with.
----------------------------
#version 3.5;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <0.15,15,-15>
  look_at   <0.0, 0.0,  0.0>
  angle 15
}


light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, 30>
}

// ----------------------------------------

plane {
  y, -1
  pigment { color rgb <0.7,0.5,0.3> }
}

// intersection of two cubes to make an octagon
difference { //octagon screw gead
    intersection {
        box     {
            <-1,-1,-1>
            <1,0,1>
        }
        box     {
            <-1,-1,-1>
            <1,0,1>
            rotate y*45
        }
    }
    // subtract the slot
    box {   // slot
        <1,1,.125>
        <-1,-.25,-.125>
        rotate y*45
    }
    // and that inset on the top
    intersection { // inset
        box     {
            <-1,-1,-1>
            <1,0,1>
        }
        box     {
            <-1,-1,-1>
            <1,0,1>
            rotate y*45
        }
        scale .9
        translate y*.85

    }
    rotate y*12.25
    pigment {color LightBlue}
    translate <2, 0, 1>
 }



#declare  Hexagon = intersection  {
    plane {x, 1}  /* Rotate 90 in z axis to stand up */
    plane {x, 1 rotate y*60}
    plane {x, 1 rotate y *120}
    plane {x, 1 rotate y *180}
    plane {x, 1 rotate y *240}
    plane {x, 1 rotate y *300}
    plane { y, 0}
    plane {-y,1}

    bounded_by {sphere{0, 1.5}}
}

difference  {
    object {    // plain head
        Hexagon
    }
    box {      // subtract the slot
        <1,1,.125>
        <-1,-.25,-.125>
    }
    object {   // and the inset
        Hexagon
            scale .9
            translate y*.8

    }
    pigment {color LightBlue}
    translate -x * .75
}
HTH

Alan Walkington
Technical Staff
United Defense, San Jose


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.