POV-Ray : Newsgroups : povray.text.scene-files : Isosurface Golden Egg source : Re: Isosurface Golden Egg source (with source) Server Time
29 Jul 2024 00:31:21 EDT (-0400)
  Re: Isosurface Golden Egg source (with source)  
From: Jerry Anning
Date: 28 Nov 1998 04:08:39
Message: <365FBDA4.C363763@dhol.com>
Jerry Anning wrote:
> 
> Here is the source for the Isosurface golden egg I posted in
> povray.binaries.images.  This uses the Isosurface patch (in this case,
> in the SuperPatch).  The "5" and "6" could be made variable and the
> shape could easily be recast as a macro or as 3.02 isosurface code.  The
> egg runs from y=-1 to y=1 along the y (up) axis with the narrow end on
> top.  I modified the formula from a Ken Perlin C snippet.  Maybe someone
> will find this useful.

Oops! Here is the source.

// Begin POV code

// Isoegg.pov - an Isosurface egg shape

#version 3.1;

global_settings { assumed_gamma 1.0 ambient_light <.846, 1.041, 1.041> } 

camera { up <0, 1, 0> right <4 / 3, 0, 0> 
  location <0, 0, -20> look_at <0, 0, 0> }

light_source { <20, 50, -100> color rgb <1.103, .993, .772> }

#include "colors.inc"

#macro Fixcols(Badcol)
  color rgb <pow(Badcol.red, 2.2), pow(Badcol.green, 2.2),
pow(Badcol.blue, 2.2)>
  filter Badcol.filter transmit Badcol.transmit
#end

sky_sphere { pigment { Fixcols(CornflowerBlue) } }

isosurface
  {
    function { 1 - sqrt((x / ((5 - y) / 6)) * (x / ((5 - y) / 6)) +
                                   y        *            y        +
                        (z / ((5 - y) / 6)) * (z / ((5 - y) / 6))) }
    accuracy .0001
    max_trace 1
    sign -1
    method 1
    texture
      {
        pigment
          {
            Fixcols(BrightGold)
          }
        finish
          {
            specular 1
            roughness .0001
            metallic
            brilliance 3
          }
      }
    scale 5
    rotate -15 * x
  }

// End POV code

Jerry Anning
cle### [at] dholcom


Post a reply to this message

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