POV-Ray : Newsgroups : povray.newusers : Faster then f_heart Server Time
30 Jul 2024 16:16:32 EDT (-0400)
  Faster then f_heart (Message 1 to 5 of 5)  
From: Brent G
Subject: Faster then f_heart
Date: 22 Oct 2003 01:41:33
Message: <3f96188d$1@news.povray.org>
Is there anything faster, but similar to, the function f_heart? It 
causes redicioulous (sp?) rendering times, current @ 7 hours for 7 
frames of a VERY simple scene (The Heart, some Water, 1 small box, and a 
text difference taken out of the box)


Post a reply to this message

From: Mike Williams
Subject: Re: Faster then f_heart
Date: 22 Oct 2003 03:02:13
Message: <QUGI7DAzsil$EwP+@econym.demon.co.uk>
Wasn't it Brent G who wrote:
>Is there anything faster, but similar to, the function f_heart? It 
>causes redicioulous (sp?) rendering times, current @ 7 hours for 7 
>frames of a VERY simple scene (The Heart, some Water, 1 small box, and a 
>text difference taken out of the box)

There's a parametric heart shape at 
<http://www.econym.demon.co.uk/isotut/real.htm#heart>
but it's not as pretty as f_heart.

As a parametric isosurface it renders a little slower than f_heart, but
it's possible to approximate it with Ingo Janssen's param.inc macro,
which runs very quickly. See "Ingoheart2.pov" in the zip file from that
page.

Alternatively you could try generating a mesh from the f_heart shape
using Kevin Loney's Approximation Macro. The first time you do it, it
will be very slow but you can save the resulting mesh to a file, and
when you read it back it will be really fast. Something like this:-

#include "functions.inc" 

background {rgb 1}

camera { location  <0, 0, -6> look_at <0, 0, 0> angle 32}

light_source {<100,200,-200> colour rgb 1}

#declare f = function {f_heart(z,x,y,-1)}

// Set this to 1 the first time, to create the mesh file
// Set it to 0 for to read the mesh from the file
#declare isoFileOption = 1;     

#declare isoMin = <-1.2,-1.2,-0.8>;
#declare isoMax = <1.2,1.2,0.8>;
#declare isoSmooth = yes;
#declare isoSegs = <40, 40, 40>;
#declare isoFile = "KLheart.iso";
#declare isoName = "Surface";
#include "isosurface.inc"

object { Surface
  pigment {rgb <0.9,0,0>}
  finish {phong 0.5 phong_size 10}
}


Post a reply to this message

From: Brent G
Subject: Re: Faster then f_heart
Date: 22 Oct 2003 03:54:24
Message: <3f9637b0$1@news.povray.org>
> Alternatively you could try generating a mesh from the f_heart shape
> using Kevin Loney's Approximation Macro. The first time you do it, it
> will be very slow but you can save the resulting mesh to a file, and
> when you read it back it will be really fast. Something like this:-
> 

Sounds like exactly what I"m looking for! Thanks!


Post a reply to this message

From: Mike Williams
Subject: Re: Faster then f_heart
Date: 22 Oct 2003 13:03:41
Message: <6ejipCAnGol$Ewrp@econym.demon.co.uk>
Wasn't it Brent G who wrote:
>Is there anything faster, but similar to, the function f_heart? It 
>causes redicioulous (sp?) rendering times, current @ 7 hours for 7 
>frames of a VERY simple scene (The Heart, some Water, 1 small box, and a 
>text difference taken out of the box)

Or you might consider building a heart shape from two half blobs. I'm no
blob expert, but I've managed to knock this together fairly quickly. It
could probably be considerably improved by adjusting some of the
numbers, particularly those defining the sphere components.


global_settings {assumed_gamma 1.0}
camera {location  <0,0,-3> look_at <0,0,0> angle 50}
background {rgb 1}
light_source {<-30, 100, -30> color rgb 1}

#declare Half = intersection {
  blob {
    threshold 0.9                       // tweak me
    sphere { < 0.3, 0.4, 0>, 1,1.2 }    // tweak me
    sphere { <-0.4,-0.4, 0>, 1.2,1.2 }  // tweak me
    //sturm
  }
  plane {-x,0}
}

#declare Heart = union {
    object {Half}
    object {Half scale <-1,0,0>}
  scale <1,1.15,0.5>                    // tweak me
}

object {Heart
  pigment {rgb <0.9,0.1,0.1>}
  finish {phong 1 phong_size 10}
}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Jeffry Reifel
Subject: Re: Faster then f_heart
Date: 22 Oct 2003 23:43:51
Message: <3f974e77$1@news.povray.org>
"Brent G" <pov### [at] bc-hqcom> wrote in message
news:3f96188d$1@news.povray.org...
> Is there anything faster, but similar to, the function f_heart? It
> causes redicioulous (sp?) rendering times, current @ 7 hours for 7
> frames of a VERY simple scene (The Heart, some Water, 1 small box, and a
> text difference taken out of the box)
>


Try this:

#declare HEART=
#macro _(T,R,F)  sphere {0,.38,1
    scale <.1+7*N,.1+6*N,.1+pow(N,1.1)*3>
     rotate <0,-15*sin(N*pi)*R,0>
      translate <T*N*.7,2*N+3*pow(N,2),-.1*sin(pi*N)>
       rotate<0,0,N*-(14+8*sin(N*pi*1))*R>
        rotate y*F
         translate y*-5
     } #end
 blob{

#declare EndNr =20;

#while (Nr< EndNr)

#declare N=Nr/ EndNr;

_(1,1,0)

_(-1,-1,0)

_(1,1,180)

_(-1,-1,180)

#declare Nr = Nr + 1;

#end

translate<0,2.5,0>
 }


Post a reply to this message

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