POV-Ray : Newsgroups : povray.general : slightly-squared torus? Server Time
3 Aug 2024 10:20:50 EDT (-0400)
  slightly-squared torus? (Message 11 to 17 of 17)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Sally
Subject: Re: slightly-squared torus?
Date: 24 Apr 2004 01:17:57
Message: <4089f885$1@news.povray.org>
Strange, I tried an isosurface and the problem is the texture that is
showing. So I simplified the code to just a isosurface sphere and still
a problem. For example:

difference {
  anyObjectHere
   sphere { <0,0,0>, 1 }
}

works fine BUT

difference {
  anyObjectHere
    isosurface {
      function { x*x + y*y + z*z - 1 }
        max_gradient 4
        contained_by{box{-3.5,+3.5}}
      }
  }

leads to the area being "cut out" by the isosurface is very dark. Aren't
the above 2 spheres equivilant?


Post a reply to this message

From: Sally
Subject: Re: slightly-squared torus?
Date: 24 Apr 2004 01:45:38
Message: <4089ff02@news.povray.org>
Found it, something about max_trace... sorry I jumped too quickly to
asking the newsgroup this time but hopefully someone else having that
problem will read this note and know its max_trace too :)


Post a reply to this message

From: Fredrik Eriksson
Subject: Re: slightly-squared torus?
Date: 24 Apr 2004 13:39:26
Message: <opr6y1zzoqzjc5hb@news.povray.org>
On Fri, 23 Apr 2004 14:52:21 +0300, Severi Salminen 
<sev### [at] NOT_THISsibafi> wrote:
> I don't think that is what Sally wanted. Your macro alters the 
> minor_radius, Sally wanted to alter the shape of major_radius.

Yes; it seems I misunderstood the question.

Allow me to retry:

Is this
http://hem.bredband.net/b230591/povray/squared_torus2.jpg
anything like what you (Sally) are looking for?

These are super-shapes with varying values of n1, n2 & n3 for the first 
shape.


---
FE


Post a reply to this message

From: Alain
Subject: Re: slightly-squared torus?
Date: 24 Apr 2004 17:46:02
Message: <408ae01a@news.povray.org>
Fredrik Eriksson nous apporta ses lumieres ainsi en ce 2004/04/24 
13:39... :

> On Fri, 23 Apr 2004 14:52:21 +0300, Severi Salminen 
> <sev### [at] NOT_THISsibafi> wrote:
>
>> I don't think that is what Sally wanted. Your macro alters the 
>> minor_radius, Sally wanted to alter the shape of major_radius.
>
>
> Yes; it seems I misunderstood the question.
>
> Allow me to retry:
>
> Is this
> http://hem.bredband.net/b230591/povray/squared_torus2.jpg
> anything like what you (Sally) are looking for?
>
> These are super-shapes with varying values of n1, n2 & n3 for the 
> first shape.
>
>
> ---
> FE

I think that's exactly the wanted shape

Alain


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: slightly-squared torus?
Date: 24 Apr 2004 19:44:07
Message: <Xns94D6118BF831Fraf256com@203.29.75.35>
bui### [at] NOSPAMyahoocom news:4089ff02@news.povray.org

> Found it, something about max_trace... sorry I jumped too quickly to
> asking the newsgroup this time but hopefully someone else having that
> problem will read this note and know its max_trace too :)

isosurface {
  function { FUNCTION_ITEMS }
[...]
  [max_trace INTEGER] | [all_intersections]
}


max_trace Isosurfaces can be used in CSG shapes since they are solid finite 
objects - if not finite by themselves, they are through the cross section 
with the container. 
By default POV-Ray searches only for the first surface which the ray 
intersects. But when using an isosurface in CSG operations, the other 
surfaces must also be found. Therefore, the keyword max_trace must be added 
to the isosurface statement. It must be followed by an integer value. To 
check for all surfaces, use the keyword all_intersections instead. 
With all_intersections POV-Ray keeps looking until all surfaces are found. 
With a max_trace it only checks until that number is reached.


-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: cubicon
Subject: Re: slightly-squared torus?
Date: 1 May 2004 15:25:00
Message: <web.4093f922ee9f5118ac0dff0b0@news.povray.org>
You could use csg also; a union of 2 rings (difference between 2 cylinders)
and 4 torus, but that 6 objects, not very efficient.


Post a reply to this message

From: cubicon
Subject: Re: slightly-squared torus?
Date: 1 May 2004 15:55:00
Message: <web.40940045ee9f5118ac0dff0b0@news.povray.org>
Sorry, I missunderstood.
The code:
#local minorR = 1;
#local majorR = 3;
#local strW = 3;
// total width = strW + majorR*2 + minorR*2
// total height = minorR*2

#local SecObj =
difference{

#local LR = majorR;
#local sr = minorR;
#local Y0 = 0;
torus{LR, sr translate y*Y0 }

plane  { <1,0,0>, 0 }
plane  { <0,0,1>, 0 }
}

#local DesiredObj = union{
#local Count = 3;
#local I = 0;
#while ( I <= Count )

   object{ SecObj translate<strW/2,0,strW/2> rotate y*90*I }
   #local cylR = minorR;
   #local cylW = strW;
   cylinder{<-cylW/2, 0, 0>  <cylW/2, 0, 0> cylR
translate<0,0,strW/2+majorR> rotate y*90*I }



#local I = I + 1;
#end
}

object{ DesiredObj }

produces this shape: http://www.geocities.com/fcmodelview/sqrtorus.jpg


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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