POV-Ray : Newsgroups : povray.general : gravity well Server Time
4 May 2024 17:29:35 EDT (-0400)
  gravity well (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: alphaQuad
Subject: Re: gravity well
Date: 11 Oct 2007 17:05:00
Message: <web.470e8f7650ab97d7e52dcb710@news.povray.org>
"alphaQuad" <alp### [at] earthlinknet> wrote:

> but it wont let me intersection or difference out one half
> and keeps whining about the function line:


ok i think it is just coincidental surfaces that is causing the error.

But removing the top half is as if it were still in the way of the light
though not rendered.

can anyone actually do this?

"hainus indeed'


Post a reply to this message

From: alphaQuad
Subject: Re: gravity well
Date: 11 Oct 2007 17:40:01
Message: <web.470e975750ab97d7e52dcb710@news.povray.org>
seems like an inverse or invert call is needed here somewhere, though I
haven't the slightest idea what I am talking about, except to say

the "inside" or topside of bottom half is dark which should be an outside
normal at the light. ideas suggestions greatly appreciated.


Post a reply to this message

From: alphaQuad
Subject: Re: gravity well
Date: 11 Oct 2007 17:55:00
Message: <web.470e9a7b50ab97d7e52dcb710@news.povray.org>
could have maybe made a gravity well mesh by now.

also I noticed that an interection withOUT coincidental surface error
suddenly had errors if camera got rotated.

so much for a "moving camera on a difference-isosurface" animation


Post a reply to this message

From: Grassblade
Subject: Re: gravity well
Date: 11 Oct 2007 18:15:00
Message: <web.470e9f9050ab97d7ad7ea8820@news.povray.org>
"alphaQuad" <alp### [at] earthlinknet> wrote:
> "Grassblade" <nomail@nomail> wrote:
>
> > Because he forgot parentheses. That expression simplifies to x*x-0.002+z*z,
> > which is a circle for every y, so a cylinder. Try x*x-0.002/(y*y)+z*z
>
> GREAT!!!!!!!!!!!!! renders 2 reversed wells
>
> but it wont let me intersection or difference out one half
> and keeps whining about the function line:
>
> starts rendering then half way thru error is:
>
> Parse Error: Floating-point exception detected in function ''. Your function
> either attempted a division by zero, used a function outside its domain or
> called an internal function with invalid parameters.
> difference {
>
>  isosurface {
>     function { (x*x) - (0.005/(y*y)) + (z*z) }
>    threshold 0
>  max_gradient 9
>  contained_by {box {<-1,-1,-1>, < 1, 1, 1>}}
>  open
>     texture {
>     pigment{ CadetBlue }
>     finish { ambient .4 }
>     }
>     scale 6
>     translate <0,0, 0>
> }
> box {<-1,-1,-1>, < 1, 1, 1>
>       scale 2
>       translate < 0, -2, 0>
>    }
> }
>
>
>
> what should one do here?
You don't want to use CSG with isosurfaces, check the tutorial at
http://www.povray.org/documentation/view/3.6.1/73/ it explains how to make
operations similar to CSG operations within the isosurface definition.

Regarding division by zero, contained_by acts like the domain of your
function. Since the domain comprises y=0, you should make sure your
denominator never reaches 0.
You can either add a small value to it (e.g. 0.002/(y*y+0.00001)), or modify
the contained_by line such that it doesn't include 0 for y, like
contained_by {box {<-1,0.0001,-1>, < 1, 1, 1>}}
This second solution should have the added advantage of getting rid of the
other well.


Post a reply to this message

From: alphaQuad
Subject: Re: gravity well
Date: 11 Oct 2007 18:35:00
Message: <web.470ea44750ab97d7e52dcb710@news.povray.org>
"Grassblade" <nomail@nomail> wrote:
> http://www.povray.org/documentation/view/3.6.1/73/ it explains how to make


page comes up:

"1.3.3.3 Isosurface Object

You know you have been raytracing too long when ...
.... You find yourself wishing you'd paid attention in math class to all
those formulae you thought you'd never have any use for in real life.
    -- Jeff Lee "

ok my triangulation.inc is for Jeff Lee

solving angles and sides is the most useful imho.

3D Macros:
  incenter(v1,v2,v3)
  centroid(v1,v2,v3)
  ccenter(v1,v2,v3)      circumcenter
  orthocenter(v1,v2,v3)
  normal_vector(v1,v2,v3)
  midpoint(v1,v2)


Functions:
  inneradius(a,b,c)
  circumradius(a,b,c)

  sss_area(a,b,c)
  sas_area(s,a,s2)
  bh_area(b,h)           Base Height

  sss_height(a,b,c)      height to side2
  sas_cos(s,a,s2)        Side Angle Side - solve length of missing side

  aas_sin(a,b,s)         AAS solve opposing side of angle2 (b)
  asa_sin(a,s,b)         ASA solve opposing side of angle2 (b)
  sss_cos(a,b,c)         SSS solve angle opposite side2    (b)
  ssa_acute(s,s2,a)      SSA solve angle opposite side2

Float Macros:
  ssa_obtuse(s,s2,a)
  sa_height(s,a)         Side Angle unknown base
  _clamp(a,n,m)


Post a reply to this message

From: Tim Attwood
Subject: Re: gravity well
Date: 11 Oct 2007 20:20:13
Message: <470ebdbd$1@news.povray.org>
You might want to look at the Witch_Hat shape in
shapesq.inc, it's a quartic instead of an isosurface,
but it looks like what you want.
I put a demo image in p.b.i, and the scene file in p.b.s-f


Post a reply to this message

From: alphaQuad
Subject: Re: gravity well
Date: 12 Oct 2007 01:25:01
Message: <web.470f03e250ab97d789ae70600@news.povray.org>
3.7.7.1.6  Invert Isosurface
Sometimes, when you render a surface, you may find that you get only the
shape of the container. This could be caused by the fact that some of the
build in functions are defined inside out.
We can invert the isosurface by negating the whole function:
  -(function) - threshold



well I am close now, but using "open" opens to an inside that does not
render,
other wise without "open" the surface is flat.
need to use open but invert (i think).

how to impliment "-(function) - threshold" correctly?

render this to see so far:

isosurface {
    function { (x*x) - (0.01/(y*y)) + (z*z) }

    threshold 0
    max_gradient 3
    contained_by {box {<-1,-1,-1>, < 1, 0.0001, 1>}}
    //open
    texture {
        pigment{ CadetBlue }
        finish { ambient .4 }
    }
    scale 2
}


Post a reply to this message

From: alphaQuad
Subject: Re: gravity well
Date: 12 Oct 2007 10:15:00
Message: <web.470f80d750ab97d7fbbc86040@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:

> I put a demo image in p.b.i, and the scene file in p.b.s-f




the second time I have seen this.

its not a link and a search returns little if anything.

But I'll try again,

drawing a blank on:
"...demo image in p.b.i, and the scene file in p.b.s-f"


Post a reply to this message

From: alphaQuad
Subject: Re: gravity well
Date: 12 Oct 2007 10:15:01
Message: <web.470f813950ab97d7fbbc86040@news.povray.org>
and how do you reverse normals on an isosurface?

cant find anything on that either.


Post a reply to this message

From: alphaQuad
Subject: Re: gravity well
Date: 12 Oct 2007 10:25:00
Message: <web.470f838150ab97d7fbbc86040@news.povray.org>
ok povray.binaries...

ok I think I am not using my password in news groups so I get no headers.
let me see if I can figure this out...


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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