POV-Ray : Newsgroups : povray.general : Egg Blobs? : Re: Egg Blobs? Server Time
8 Aug 2024 06:18:57 EDT (-0400)
  Re: Egg Blobs?  
From: Tor Olav Kristensen
Date: 8 Feb 2001 21:00:08
Message: <3A834EAD.1BBF7C9C@hotmail.com>
Josh English wrote:
> 
> Someone just asked me what the mathematical name for the shape of an egg
> was, since eggs aren't ellipsoidal, there must be another term, so I
> thought. I did find these pages and I wonder how the math relates to the
> blob function, or how shapes like the demonstration for Cassini's oval
> might be done as an isosurface (which I should probably post to p.u.p, I
> know) and generalized into 3D space... it might make them easier (for me
> at least) to understand.
> 
> http://new.math.uiuc.edu/eggmath/Shape/cassini.htm
>
> http://new.math.uiuc.edu/eggmath/Shape/descartes.html

That's some interesting pages !

But you left out the last l in the first link.

This link works:
http://new.math.uiuc.edu/eggmath/Shape/cassini.html

See my example code below for such iso-surface eggs.
(Requires MegaPOV)


-- 
Best regards,

Tor Olav


// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
// Cassini and Descartes Eggs 
// By Tor Olav Kristensen
// mailto:tor### [at] hotmailcom
// http://www.crosswinds.net/~tok
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

#version unofficial MegaPov 0.5;

#include "colors.inc"
#include "textures.inc"

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7

$ P1 = <-1,  1, 0>;
$ P2 = < 1, -1, 0>;

$ P1x = P1.x;
$ P1y = P1.y;
$ P1z = P1.z;

$ P2x = P2.x;
$ P2y = P2.y;
$ P2z = P2.z;

/*
$ P3 = <-1, -1, -1>/3;

$ P3x = P3.x;
$ P3y = P3.y;
$ P3z = P3.z;
*/

$ SphereFunction = function { sqrt(x*x + y*y + z*z) }

$ CassiniEggs =
isosurface {
  function {
     SphereFunction(x - P1x, y - P1y, z - P1z)
    *SphereFunction(x - P2x, y - P2y, z - P2z)
//    *SphereFunction(x - P3x, y - P3y, z - P3z)
//    +0.15*noise3d(30*x, 30*y, 30*z)
  }
  threshold 1.95 // Also try 2.00 and 2.20
  contained_by { sphere { <0, 0, 0>, 10 } }
  method 1
}

object {
  CassiniEggs
  texture {
    pigment { color (White + Blue)/2 }
    finish { Dull }
  }
}


/*
$ DescartesEgg =
isosurface {
  function {
       SphereFunction(x - P1x, y - P1y, z - P1z)
    +2*SphereFunction(x - P2x, y - P2y, z - P2z)
//    +0.05*noise3d(4*x, 4*y, 4*z)
  }
  threshold 5
  contained_by { sphere { <0, 0, 0>, 10 } }
  method 1
}

object {
  DescartesEgg
  texture {
    pigment { color Gray30 }
    finish { Dull }
  }
}
*/

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =

background { color Magenta/4 }

light_source {
  <5, 0, -1>*10
  color White/2 + Red
}

light_source {
  <1, 0, -5>*10
  color White
}

camera {
  location <0, 0, -5>
  look_at <0, 0, 0>
}

// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7


Post a reply to this message

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