POV-Ray : Newsgroups : povray.binaries.images : "Rounded" object example / ideas? : Re: "Rounded" object example / ideas? Server Time
26 May 2024 02:51:28 EDT (-0400)
  Re: "Rounded" object example / ideas?  
From: Cousin Ricky
Date: 6 Jun 2015 12:05:44
Message: <55731a58@news.povray.org>
On 05/24/2015 04:56 AM, Lars Rohwedder wrote:
> Do you have other ideas for other "rounded" objects? :-)

Whatever this thing is, it is made of POV-Ray primitives that are 
patched with isosurfaces where they join.  The isosurfaces are blobbed 
with functions from the RoundEdge module of the Object Collection.

The white circle on the right edge of one the images is an unimplemented 
lamp fixture.  Pay it no mind.

----------[BEGIN CODE EXCERPT]----------
#include "functions.inc"
#include "roundedge.inc"

#declare fn_Cone = function
{ f_sphere (x, 0, z, -0.5 * y)
}
#declare rEdge_cone = 1.5;
#declare RBlob_torus = sqrt(3);

#declare Cone_blob = isosurface
{ function
   { 1 - sqrt
     ( RE_fn_Blob2 (fn_Cone (x, y, z), rEdge_cone)
     + RE_fn_Blob2 (-y, rEdge_cone)
     )
   }
   contained_by { box { -rEdge_cone, <rEdge_cone, 0.01, rEdge_cone> } }
   max_gradient 1.12 / rEdge_cone
}

#declare Sphere_blob = isosurface
{ function
   { 1 - sqrt
     ( RE_fn_Blob2 (f_sphere (x, y, z + 4, 4), 1)
     + RE_fn_Blob2 (-z, 1)
     )
   }
   contained_by { box { -<3, 3, 1>, <3, 3, 0.01> } }
   max_gradient 1
}

#declare Torus_blob = isosurface
{ function
   { 1 - sqrt
     ( RE_fn_Blob2 (f_torus (x - 4, z, y, 3, 1), 1)
     + RE_fn_Blob2 (x, 1)
     )
   }
   contained_by { box { -<0.01, 3, RBlob_torus>, <1, 3, RBlob_torus> } }
   max_gradient 1
}
#declare Torus_and_blob = union
{ object { Torus_blob }
   torus { 3, 1 rotate 90 * x translate 4 * x }
   translate <5, 13, 0>
}

#declare A = sqrt (0.2);
#declare B = 1 + A;
#declare R2 = 4 - B / 2;
#declare R1 = R2 - 2 * A;
union
{ RE_Box (<-5, 8, -5>, <5, 18, 5>, 1, no)
   cone { B * y, R2, 8 * y, 0 }
   cylinder { 0, B * y, R1 }
   torus { R1, 1 translate y }
   object { Cone_blob translate 8 * y }
   sphere { <0, 13, -9>, 4 }
   object { Sphere_blob translate <0, 13, -5> }
   object { Torus_and_blob }
   object { Torus_and_blob scale <-1, 1, 1> }
   scale 1/10
}
-----------[END CODE EXCERPT]-----------


Post a reply to this message


Attachments:
Download 'blobbed_shapes-front.jpg' (41 KB) Download 'blobbed_shapes-side.jpg' (39 KB)

Preview of image 'blobbed_shapes-front.jpg'
blobbed_shapes-front.jpg

Preview of image 'blobbed_shapes-side.jpg'
blobbed_shapes-side.jpg


 

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