POV-Ray : Newsgroups : povray.newusers : need help with parametric surface Server Time
14 May 2024 17:59:54 EDT (-0400)
  need help with parametric surface (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: jr
Subject: Re: need help with parametric surface
Date: 12 Mar 2014 19:19:39
Message: <5320eb8b$1@news.povray.org>
hi Lionel,

On 11/03/2014 22:18, FractRacer wrote:
> The <-pi,pi> bounds are the values used for the computations. As if you
> compute the cosinus in the range <-pi,pi> or in the range <-1,1>, it is
> not a way to scale. Ex, the values for a circle are in the range
> <0,2pi>, which is like <-pi,pi>.

thanks.  as I said, my maths is .. poor.

>> btw, inside_texture is not available in v3.6.
> I think Alain make an syntax error, he probably thought:
> interior_texture{pigment{rgb<1,0,0>}finish{ambient 1}}

ok.

> And why not install PovRay 3.7?

I'm very new to using Povray and v3.6 will be fine for 'learning the ropes'.

> I can't understand what you want, the p_umbilic.pov file make exactly
> what you want. I think (but I am human and I could be wrong) you can
> texture this object like another, you create your texture with
> calculations and apply then to the shape.

it does, but first I want to learn how to do certain objects/scenes
rather than using a pre-made solution (though it's always good to have a
fall-back).

you, for example, have already enough knowledge to see that Alain just
made a simple error.  I will need to work/learn to gain understanding,
so that I too could spot such errors.

texturing is some way off yet, but I'll bear in mind that both methods
are available.

> I hope you succeed in your image.

sincere thanks.


Post a reply to this message

From: Alain
Subject: Re: need help with parametric surface
Date: 12 Mar 2014 20:18:49
Message: <5320f969@news.povray.org>

> hi Alain,
>
> thank you for replying.
>
> On 11/03/2014 02:50, Alain wrote:
>> Looking at your function, I suspect ... box {<-9, -2, -9>, <9, 2, 9>}
>
>> Add an identical box with pigment{rgbt<1, 0.1, 0.1, 1>} to your scene if
>> it looks like there are missing parts.
>
>> You can also add inside_texture{pigment{rgb<1,0,0>}finish{ambient 1}}.
>> That way, any hole should appear in bright red.
>>
>> Next, the camera needs to be located outside that box.
>
> I followed your advice and used those bounds, initially with colour to
> verify the camera placing.  I also placed the box with the transparency.
>
> no joy though, still all black; I even managed to lose the "*something*"
> found by Scott. :-(
>
> after some more googling I downloaded Ingo's MMGM and had a look at his
> p_umbilic.pov file, which works nicely (and so much faster than the
> parametric).  what is very confusing though is that Ingo's version swaps
> the x and z functions when compared to the formulas in Wikipedia and
> Blaise Montandon's program, and also that BM's formulae incorporate the
> pi and use -1..1 bounds while the others use -pi..pi bounds, a different
> way of scaling I assume?
>
> I shall have to burn some more 'midnight oil', my aim is to use the
> parametric because, AIUI, the surface can then be decorated with a
> texture which itself is the result of a computation (needed, I think, to
> replicate the Hilbert curve engraved on the original artwork).
>
> btw, inside_texture is not available in v3.6.
>

Oups! It's should have been interior_texture, and it's definitively a 
feature found in 3.6. Not sure, but it may have been there in 3.5 or 
earlier.

You should upgrade to version 3.7. It's somewhat faster, can take 
advantage of all cores on modern computer, have several bug fixes, 
introduce some new features like subsurface light transport and high 
dynamic range images as source and output option.
It also have some improvements for focal blur and antialiasing. The irid 
code is totaly redone as it was broken in version 3.6: Just add this to 
some finish to see what's the problem (also try with turbulence 10, 1, 
0.1, 0.01):
irid{0.2 thickness 0.2 turbulence 0.001}




Alain


Post a reply to this message

From: Alain
Subject: Re: need help with parametric surface
Date: 12 Mar 2014 20:21:16
Message: <5320f9fc@news.povray.org>

> hi Lionel,
>
> On 11/03/2014 22:18, FractRacer wrote:
>> The <-pi,pi> bounds are the values used for the computations. As if you
>> compute the cosinus in the range <-pi,pi> or in the range <-1,1>, it is
>> not a way to scale. Ex, the values for a circle are in the range
>> <0,2pi>, which is like <-pi,pi>.
>
> thanks.  as I said, my maths is .. poor.
>
>>> btw, inside_texture is not available in v3.6.
>> I think Alain make an syntax error, he probably thought:
>> interior_texture{pigment{rgb<1,0,0>}finish{ambient 1}}
>
> ok.
>
>> And why not install PovRay 3.7?
>
> I'm very new to using Povray and v3.6 will be fine for 'learning the ropes'.

You should go straight to version 3.7. That way, you won't need to 
UNlearn some of those "ropes"...



Alain


Post a reply to this message

From: FractRacer
Subject: Re: need help with parametric surface
Date: 13 Mar 2014 07:40:16
Message: <53219920@news.povray.org>
Hi Jr,

I have modified Ingo's file like this:
#declare Set=5;

// in switch block add:
#case (5)
#declare F1= function(u,v) 
{sin(pi*u)*(7.0+cos((pi*u/3.0)-(2.0*pi*v))+2.0*cos((pi*u/3.0)+(pi*v))) };
#declare F2= function(u,v) 
{cos(pi*u)*(7.0+cos((pi*u/3.0)-(2.0*pi*v))+2.0*cos((pi*u/3.0)+(pi*v))) };
#declare F3= function(u,v) { 
sin((pi*u/3.0)-(2.0*pi*v))+2.0*sin((pi*u/3.0)+(pi*v)) };
#break

// in object block add:
#if (Set=5)
Parametric(
	F1, F2, F3,
	<-pi, -pi>, < pi, pi>,
	50,50,""
)
#end

I remark your object have some holes on the borders, maybe you have to 
modify the formulas.

Lionel.
-- 
Do not judge my words, judge my actions.

---

parce que la protection avast! Antivirus est active.
http://www.avast.com


Post a reply to this message

From: FractRacer
Subject: Re: need help with parametric surface
Date: 13 Mar 2014 07:43:01
Message: <532199c5$1@news.povray.org>
Me again,
just little changes in the formulas, I delete all pi and the torus is 
better.

#declare F1= function(u,v) 
{sin(u)*(7.0+cos((u/3.0)-(2.0*v))+2.0*cos((u/3.0)+(v))) };
#declare F2= function(u,v) 
{cos(u)*(7.0+cos((u/3.0)-(2.0*v))+2.0*cos((u/3.0)+(v))) };
#declare F3= function(u,v) { sin((u/3.0)-(2.0*v))+2.0*sin((u/3.0)+(v)) };


Lionel.
-- 
Do not judge my words, judge my actions.

---

parce que la protection avast! Antivirus est active.
http://www.avast.com


Post a reply to this message

From: jr
Subject: Re: need help with parametric surface
Date: 13 Mar 2014 19:45:05
Message: <53224301$1@news.povray.org>
hi Alain,

On 13/03/2014 00:21, Alain wrote:
> You should go straight to version 3.7. That way, you won't need to
> UNlearn some of those "ropes"...

hmm, are you saying that the syntax for /existing/ SDL statements has
changed from 3.6 to 3.7?

> It's somewhat faster, can take advantage of all cores on modern
> computer, have several bug fixes, introduce some new features like
> subsurface light transport and high dynamic range images as source
> and output option.
> It also have some improvements for focal blur and antialiasing.
> The irid code is totaly redone as it was broken in version 3.6 ...

I might (for now) miss out on bug fixes and new features, but that's ok
for a learner; wrt multiple cores - I run Povray on a VM which is
limited to 'see' 1 cpu and 1G RAM.


Post a reply to this message

From: jr
Subject: Re: need help with parametric surface
Date: 13 Mar 2014 19:48:20
Message: <532243c4$1@news.povray.org>
hi Lionel,

On 13/03/2014 11:46, FractRacer wrote:
> I have modified Ingo's file like this:

On 13/03/2014 11:46, FractRacer wrote:
> just little changes in the formulas, I delete all pi and the torus is
> better.

merci bien, Lionel.  I'll probably keep that file modification.


Post a reply to this message

From: Alain
Subject: Re: need help with parametric surface
Date: 15 Mar 2014 16:16:15
Message: <5324b50f$1@news.povray.org>

> hi Alain,
>
> On 13/03/2014 00:21, Alain wrote:
>> You should go straight to version 3.7. That way, you won't need to
>> UNlearn some of those "ropes"...
>
> hmm, are you saying that the syntax for /existing/ SDL statements has
> changed from 3.6 to 3.7?

Some feature work in a slightly different way.
Some features have some alternative or optional syntax, like back side 
illumination that is invoked be using 2 parameters for the diffuse value.
There are some bug fixes.
There are several workarounds that are no longer needed, of may actualy 
cause some problems.
There are HUGE changes with radiosity.
Focal blur have been revamped and now work along with regular 
antialiasing. It's also significatively faster.
The paremeters for irid work differently: They are now more closely 
related to actual physical properties.
If you try to render some newer scenes that use new features that you 
can find on the forums, it may abort with some error if you are still 
using version 3.6.

>
>> It's somewhat faster, can take advantage of all cores on modern
>> computer, have several bug fixes, introduce some new features like
>> subsurface light transport and high dynamic range images as source
>> and output option.
>> It also have some improvements for focal blur and antialiasing.
>> The irid code is totaly redone as it was broken in version 3.6 ...
>
> I might (for now) miss out on bug fixes and new features, but that's ok
> for a learner; wrt multiple cores - I run Povray on a VM which is
> limited to 'see' 1 cpu and 1G RAM.
>

Version 3.6 NOT OK for a learner :( At least, it's no longer OK.

The learning curve is the same for both versions. Even if your VM 
environment only expose a single CPU/core, there is no reason to stick 
with version 3.6. Version 3.7 is the current OFFICIAL release.



Alain


Post a reply to this message

From: Alain
Subject: Re: need help with parametric surface
Date: 15 Mar 2014 16:24:40
Message: <5324b708$1@news.povray.org>


>> hi Alain,
>>
>> On 13/03/2014 00:21, Alain wrote:
>>> You should go straight to version 3.7. That way, you won't need to
>>> UNlearn some of those "ropes"...
>>
>> hmm, are you saying that the syntax for /existing/ SDL statements has
>> changed from 3.6 to 3.7?
>
> Some feature work in a slightly different way.
> Some features have some alternative or optional syntax, like back side
> illumination that is invoked be using 2 parameters for the diffuse value.
> There are some bug fixes.
> There are several workarounds that are no longer needed, of may actualy
> cause some problems.
> There are HUGE changes with radiosity.
> Focal blur have been revamped and now work along with regular
> antialiasing. It's also significatively faster.
> The paremeters for irid work differently: They are now more closely
> related to actual physical properties.
> If you try to render some newer scenes that use new features that you
> can find on the forums, it may abort with some error if you are still
> using version 3.6.
>
>>
>>> It's somewhat faster, can take advantage of all cores on modern
>>> computer, have several bug fixes, introduce some new features like
>>> subsurface light transport and high dynamic range images as source
>>> and output option.
>>> It also have some improvements for focal blur and antialiasing.
>>> The irid code is totaly redone as it was broken in version 3.6 ...
>>
>> I might (for now) miss out on bug fixes and new features, but that's ok
>> for a learner; wrt multiple cores - I run Povray on a VM which is
>> limited to 'see' 1 cpu and 1G RAM.
>>
>
> Version 3.6 NOT OK for a learner :( At least, it's no longer OK.
>
> The learning curve is the same for both versions. Even if your VM
> environment only expose a single CPU/core, there is no reason to stick
> with version 3.6. Version 3.7 is the current OFFICIAL release.
>
>
>
> Alain

By the way, my antiquated computer have only a single CPU, and after I 
upgraded to version 3.7 there is NO idea of ever turning back. It works 
SO much beter!


Alain


Post a reply to this message

From: jr
Subject: Re: need help with parametric surface
Date: 17 Mar 2014 18:54:20
Message: <53277d1c$1@news.povray.org>
hi Lionel and Alain,

to follow up, the scene below uses the parametric directly.

Alain's bounding box guess was pretty close (I've added a
frame to show it), I had expected a much smaller object.

----------<snip>----------

// umbilic torus

#version 3.6;

#include "colors.inc"
#include "shapes.inc"

light_source { <100,100,-100> color White }

camera {
  location <0,0,-30>
  look_at <1,-1,0>
}


#declare oUmbilic = parametric {
  function {sin(u)*(7+cos((u/3)-(2*v))+2*cos((u/3)+v))},
  function {cos(u)*(7+cos((u/3)-(2*v))+2*cos((u/3)+v))},
  function {sin((u/3)-(2*v))+2*sin((u/3)+v)}
  <0,0>,<2*pi,2*pi>
  contained_by { box { <-10,-10,-3>, <10,10,3> } }
  accuracy .0001
  precompute 15 x,y,z
}


union {

  object { oUmbilic pigment { Blue } }

  object {
    Wire_Box_Union(<-10.1,-10.1,-3.1>,<10.1,10.1,3.1>,.05)
    pigment { Red }
  }

  rotate -z*15
  rotate x*30
  rotate y*clock*360
}

----------<snip>----------

thank you both.


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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