POV-Ray : Newsgroups : povray.binaries.images : how to Server Time
18 Nov 2024 10:21:29 EST (-0500)
  how to (Message 1 to 6 of 6)  
From: m o p s
Subject: how to
Date: 8 Sep 2005 09:41:06
Message: <43203f72@news.povray.org>
Could you tell me if there is a simple way to build this shape. It's inside 
a torus when major radius < minor radius. I realise one macro ( the blu 
shape ) but it's empty, i would like to have this shape filled.
thank you

i hpe that my english is understable


Post a reply to this message


Attachments:
Download 'noyau.jpg' (11 KB)

Preview of image 'noyau.jpg'
noyau.jpg


 

From: Christoph Hormann
Subject: Re: how to
Date: 8 Sep 2005 10:10:02
Message: <dfpgnh$9di$1@chho.imagico.de>
m.o.p.s wrote:
> Could you tell me if there is a simple way to build this shape. It's inside 
> a torus when major radius < minor radius. I realise one macro ( the blu 
> shape ) but it's empty, i would like to have this shape filled.
> thank you

#include "functions.inc"

isosurface {
   function {
     f_sphere(x+0.5*sin(f_th(x,z,y)),y+0.5*cos(f_th(x,z,y)),z, 1.0)
   }
   contained_by { box{-1, 1} }
}

The 1.0 is the minor radius, the two 0.5 the major radius.

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: Le Forgeron
Subject: Re: how to
Date: 8 Sep 2005 10:14:15
Message: <43204737$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

m.o.p.s wrote:
> Could you tell me if there is a simple way to build this shape. It's inside 
> a torus when major radius < minor radius. I realise one macro ( the blu 
> shape ) but it's empty, i would like to have this shape filled.
> thank you
> 

This shape is called "lemon".

You can either:
 - find the isosurface equation for it.
 - ? use CSG of the torus with a cylinder (intersection)
   the hardest (not too hard) part being to compute the actuel height of
the pointy part... I'm not sure it work directly, you might need some
inverse somewhere.

Have fun at http://mathworld.wolfram.com/Lemon.html



- --
Eifersucht ist die Leidenschaft, die mit Eifer sucht, was Leiden schafft.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDIEc2s/YJ43cSjHIRAnogAJ40D4+kty7oOj3/prKXdyv+KqpdCwCgqi4z
gDlCRavdmcy4y+CnTumB68c=
=xlkV
-----END PGP SIGNATURE-----


Post a reply to this message

From: Christoph Hormann
Subject: Re: how to
Date: 8 Sep 2005 10:25:02
Message: <dfphjh$9ko$1@chho.imagico.de>
Christoph Hormann wrote:
> 

Yeah, should try the simple idea first before doing the complicated:

> isosurface {
>   function {
>     f_sphere(x+0.5*sin(f_th(x,z,y)),y+0.5*cos(f_th(x,z,y)),z, 1.0)
       f_torus(x,z,y, -0.5, 1.0)
>   }
>   contained_by { box{-1, 1} }
> }

:-)

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 24 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

From: repiv
Subject: Re: how to
Date: 8 Sep 2005 11:00:35
Message: <43205213$1@news.povray.org>
m.o.p.s wrote:
> Could you tell me if there is a simple way to build this shape. It's inside 
> a torus when major radius < minor radius. I realise one macro ( the blu 
> shape ) but it's empty, i would like to have this shape filled.
> thank you
> 
> i hpe that my english is understable 
> 
> 
> 
I think you'r looking for this:

//abs(Major) < abs(Minor)

#local Major2 = Major*Major;
#local Minor2 = Minor*Minor;

intersection {
   quartic {
     <1, 0, 0, 0, 2, 0, 0, 2, 0,-2*(Major2+Minor2),
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      1, 0, 0, 2, 0,+2*(Major2-Minor2), 0, 0, 0, 0,
      1, 0,-2*(Major2+Minor2), 0, (Major2-Minor2)*(Major2-Minor2)>
     inverse
   }
   sphere {0, sqrt(Minor2-Major2)}
   bounded_by {sphere {0, sqrt(Minor2-Major2)}}
}


Post a reply to this message

From: m o p s
Subject: Re: how to
Date: 8 Sep 2005 12:18:17
Message: <43206449$1@news.povray.org>
thanks a lot, exactly what i'm looking for.
I try to finish quickly my little work and the update of my pages.
bye


Post a reply to this message

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