How to produce a thread in povray?

How to produce a thread in povray?

Post by Harald Harde » Tue, 19 Sep 2000 04:00:00



Dear povray experts,

has anyone an idea how to produce a thread of a*in povray?
The usage of lathe or sor is not possible because a shift along the axis
would be necessary while rotating. I don't want to calculate hundreds of
triangles to get a thread.
Has someone a simpler idea?

Thank you
Harald

--
Harald Harders                             Langer Kamp 8
Institut fr Werkstoffe                    D-38106 Braunschweig
Technische Universit?t Braunschweig        Germany

WWW   : http://www.veryComputer.com/;Fax: +49 (0)5 31 - 3 91 - 30 58

 
 
 

How to produce a thread in povray?

Post by Warp » Tue, 19 Sep 2000 04:00:00


: I don't want to calculate hundreds of
: triangles to get a thread.

  Why not?

--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

 
 
 

How to produce a thread in povray?

Post by Harald Harde » Tue, 19 Sep 2000 04:00:00




>: I don't want to calculate hundreds of
>: triangles to get a thread.

>  Why not?

It would be okay if povray would do that for me. But I don't want to use an
external tool because I will need threads at different sizes in many
pictures.
Would it be possible to patch povray's lathe or sor algorithms to combine
the rotation with a translation? Then I could try to do it but I am not sure
if I am able to.

Harald

--
Harald Harders                             Langer Kamp 8
Institut fr Werkstoffe                    D-38106 Braunschweig
Technische Universit?t Braunschweig        Germany

WWW   : http://www.tu-bs.de/institute/ifw/  Fax: +49 (0)5 31 - 3 91 - 30 58

 
 
 

How to produce a thread in povray?

Post by Warp » Tue, 19 Sep 2000 04:00:00


: It would be okay if povray would do that for me.

  It can. You can perfectly create triangles inside a #while-loop.

: Would it be possible to patch povray's lathe or sor algorithms to combine
: the rotation with a translation?

  You don't need a patch for this.

--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

 
 
 

How to produce a thread in povray?

Post by Harald Harde » Tue, 19 Sep 2000 04:00:00




>: It would be okay if povray would do that for me.

>  It can. You can perfectly create triangles inside a #while-loop.

>: Would it be possible to patch povray's lathe or sor algorithms to combine
>: the rotation with a translation?

>  You don't need a patch for this.

I ment a angle dependent translation of the curve that generates the surface
of the lathe. The curve that is given in the lathe generates the surface
by beeing rotated around the y axis from 0 to 360. Am I able to add a
shift in y direction while rotating the curve?

Now we have something like:
x(t,phi) = x(t) * cos(phi)
z(t,phi) = z(t) * sin(phi)
z(t,phi) = t

And I would like to have this:
x(t,a,phi) = x(t) * cos(phi)
z(t,a,phi) = z(t) * sin(phi)
z(t,a,phi) = t+a*phi

By this it would be possible to generate threads easily.

Did you mean this is possible right now?

Harald

--
Harald Harders                             Langer Kamp 8
Institut fr Werkstoffe                    D-38106 Braunschweig
Technische Universit?t Braunschweig        Germany

WWW   : http://www.tu-bs.de/institute/ifw/  Fax: +49 (0)5 31 - 3 91 - 30 58

 
 
 

How to produce a thread in povray?

Post by Remco de Kort » Tue, 19 Sep 2000 04:00:00





> >: I don't want to calculate hundreds of
> >: triangles to get a thread.

> >  Why not?

> It would be okay if povray would do that for me. But I don't want to use an
> external tool because I will need threads at different sizes in many
> pictures.
> Would it be possible to patch povray's lathe or sor algorithms to combine
> the rotation with a translation? Then I could try to do it but I am not sure
> if I am able to.

> Harald

> --
> Harald Harders                             Langer Kamp 8
> Institut fr Werkstoffe                    D-38106 Braunschweig
> Technische Universit?t Braunschweig        Germany

> WWW   : http://www.tu-bs.de/institute/ifw/  Fax: +49 (0)5 31 - 3 91 - 30 58

If you look here:
http://victorian.fortunecity.com/dada/507/
you'll find an image with a screw, even a bent one. I'm pretty sure the source
is there as well.

Remco
http://www.xs4all.nl/~remcodek/

 
 
 

How to produce a thread in povray?

Post by Warp » Tue, 19 Sep 2000 04:00:00


  There's no limit on how you can arrange a bunch of triangles. Why should
there be, anyways?

--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

 
 
 

How to produce a thread in povray?

Post by budthef.. » Tue, 19 Sep 2000 04:00:00




Quote:> Dear povray experts,

> has anyone an idea how to produce a thread of a*in povray?
> The usage of lathe or sor is not possible because a shift along the
axis
> would be necessary while rotating. I don't want to calculate hundreds
of
> triangles to get a thread.
> Has someone a simpler idea?

> Thank you
> Harald

if you're using MegaPov, you can create a sphere_sweep that spirals down
(you'll have to use a macro to generate the points for the sweep) and
then difference that from a cylinder...

if you want the source code I can email it to you...

dan

http://www.veryComputer.com/

Sent via Deja.com http://www.veryComputer.com/
Before you buy.

 
 
 

How to produce a thread in povray?

Post by Ken » Tue, 19 Sep 2000 04:00:00



> Dear povray experts,

> has anyone an idea how to produce a thread of a*in povray?
> The usage of lathe or sor is not possible because a shift along the axis
> would be necessary while rotating. I don't want to calculate hundreds of
> triangles to get a thread.
> Has someone a simpler idea?

I have a simpler idea :) Take a look at Marc's bolt macro -

http://www.veryComputer.com/~marc/bolts.html

--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://www.veryComputer.com/://www.povray.org/links/

 
 
 

How to produce a thread in povray?

Post by Harr » Tue, 19 Sep 2000 04:00:00



> By this it would be possible to generate threads easily.

> Did you mean this is possible right now?

The loops in POV an wonderful things. You should certainly be able to
make the threads you want. I've done double helix structures this way.
 
 
 

How to produce a thread in povray?

Post by Harald Harde » Wed, 20 Sep 2000 04:00:00




>> Dear povray experts,

>> has anyone an idea how to produce a thread of a*in povray?
>> The usage of lathe or sor is not possible because a shift along the axis
>> would be necessary while rotating. I don't want to calculate hundreds of
>> triangles to get a thread.
>> Has someone a simpler idea?

>I have a simpler idea :) Take a look at Marc's bolt macro -

>http://www.veryComputer.com/~marc/bolts.html

Thank you, that's exactly what I have searched for.

Harald

--
Harald Harders                             Langer Kamp 8
Institut fr Werkstoffe                    D-38106 Braunschweig
Technische Universit?t Braunschweig        Germany

WWW   : http://www.veryComputer.com/;Fax: +49 (0)5 31 - 3 91 - 30 58

 
 
 

How to produce a thread in povray?

Post by Mike William » Wed, 20 Sep 2000 04:00:00





>> Dear povray experts,

>> has anyone an idea how to produce a thread of a*in povray?
>> The usage of lathe or sor is not possible because a shift along the
>axis
>> would be necessary while rotating. I don't want to calculate hundreds
>of
>> triangles to get a thread.
>> Has someone a simpler idea?

>> Thank you
>> Harald

>if you're using MegaPov, you can create a sphere_sweep that spirals down
>(you'll have to use a macro to generate the points for the sweep) and
>then difference that from a cylinder...

If you're using MegaPov, you can use Helix1, or Helix2
(see http://www.veryComputer.com/)
or design your own equivalents, like

#declare R=2;
#declare Turns=10;
#declare r1 = 1.0;
#declare r2 = 0.1;

#declare Fx = function {r1*sin(u*Turns) + r2*cos(v)}
#declare Fy = function {r1*cos(u*Turns) + r2*sin(v)}
#declare Fz = function {u}

#declare U1 = -2;
#declare U2 =  2;
#declare V1 = -pi;                      
#declare V2 =  pi;

parametric {
  function Fx(u,v,0),  Fy(u,v,0),  Fz(u,v,0)
      <U1,V1>,<U2,V2>
      <-R,-R,-R>,<R,R,R>
  accuracy 0.001
  precompute 18, [x,y,z]

Quote:}

--
Mike Williams
Gentleman of Leisure
 
 
 

How to produce a thread in povray?

Post by -rjcha » Thu, 21 Sep 2000 04:00:00


Quote:>Thank you, that's exactly what I have searched for.

>Harald

The simplest solution is usually the BEST solution. Or, in this case, an
inclined plane wrapped around a cylinder.
 
 
 

How to produce a thread in povray?

Post by Warp » Thu, 21 Sep 2000 04:00:00


: The simplest solution is usually the BEST solution.

  It depends on your definition of "BEST".
  If it means "best in rendering speed", then the simplest solution may not
be the best one.
  If rendering speed is not the main concern, but getting the thing done
easily and the result looking good, then the simplest solution may be the
way to go (although it may mean a 10 times slower rendering, or more).

--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

 
 
 

How to produce a thread in povray?

Post by Harald Harde » Thu, 21 Sep 2000 04:00:00



Quote:>Dear povray experts,

>has anyone an idea how to produce a thread of a*in povray?
>The usage of lathe or sor is not possible because a shift along the axis
>would be necessary while rotating. I don't want to calculate hundreds of
>triangles to get a thread.
>Has someone a simpler idea?

In addition to the bolts package I now have written a solution only using
smooth_triangles. This solution is more than 10 times faster than the bolts
package.
But now I have a problem programming the ends of the
thread with a bevel (I don't know if this is the right term, "Fase" in
German). With solid objects it would be easy using e.g. difference but
triangles are not solid, unfortunately. Is it possible to convert a closed
surface of triangles to a solid body? Or is there another possibility to
generate a good end of a thread without calculating the intersection points
of a triangle and a cone by hand?

Yours
Harald

PS: I will try the solutions using MegaPov somedays, but I have not installed
it yet.

--
Harald Harders                             Langer Kamp 8
Institut fr Werkstoffe                    D-38106 Braunschweig
Technische Universit?t Braunschweig        Germany

WWW   : http://www.veryComputer.com/;Fax: +49 (0)5 31 - 3 91 - 30 58

 
 
 

1. SMP or Threaded POVRay for LINUX?

I just recently started using POVRay for LINUX.  As everybody keeps
saying, I noticed that raytracing takes a while to render an image.  I
was wondering if anybody had customized POVRay for SMP (symmetric
multi-processing) or Threads.  If anybody knows of such an animal, then
I'd appreciate hearing about it.  TIA

Daniel

2. FS:MAX & NLE stuff/ MUST GO!

3. Multi-threaded POVRAY 3.1a

4. OPENGL and String

5. screw threads in povray?

6. PM6.5 File size problems...

7. Is Povray Multy-Threaded?

8. Free Animated GIFs

9. Thread 1.1 has been released! (POVRAY freeware)

10. Newsserver povray: new.povray.org

11. Povray 2 --> Povray 3

12. ftp.povray.org & www.povray.org