|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Twyst wrote:
>
> What does Lutz have to do with this? He writes a modeller -- He could make
> it as a mesh, or something, but (AFAIK) he's never hacked the pov code.
> (easier would be to make a plugin, I think)
>
> ( I hope this isn't another case of confusing a modeller with a
> renderer... )
>
It does look like a fun primative. Added to a modeler like Moray would
have it's challenges if support wasn't offered by the program rendering
the file. If it was in native Pov format it would gain the benefit of
having varaibles for changing the behavior of the object and would be
a better option. I liked the different shapes shown using various
parameters. Many had similar patterns like the index of superellisoids
I did not so long ago.
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken schrieb in Nachricht <36D3293F.1CC960F0@pacbell.net>...
>Jerry Anning wrote:
>> Sorry about the underscores and indenting, Ken!
>>
>> // Begin POV code
>>
>> // _Rj is major radius
>> // _Rn is minor radius
>> // _E1 and _E2 are exponents
>>
>> #macro Supertoroid(_Rj, _Rn, _E1, _E2)
>
>I don't understand why you would want to increase the amount of typing
>needed to produce your work, but if it make you happy, then I'm happy.
I don't understand he even puts some comments and empty lines in there (much
more typing), except for clarity perhaps. But I must admit, the comments are
not indented <g>.
--
Rudy Velthuis
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Tue, 23 Feb 1999 18:13:00 GMT, nos### [at] despamcom (Jerry Anning)
wrote:
>I coded it as a macro using the parametric object in SuperPatch. For
>some reason, it works fine with exponents of 1.0 (regular torus) but
>gives garbage for any other exponent. Is it the parametric object,
>the equations in the referenced page or my bad coding?
It appears to be a little of both the parametric object and your
bad coding. :) First, your bad coding:
> function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
> (sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
> (sin(u) ^ _E2) * _Rn
The z term is supposed to be based on sin(v), not sin(u).
Now the bad news: there seems to be an issue with the parametric
stuff that I don't fully understand. It seems like only things
in the first quadrant, where both the sin and the cos are positive,
get rendered correctly. I found an ABS in the code for exponentiation
that could have caused the problem, but removing it didn't seem to
make the problem go away. It's possible that I'm missing something
somewhere else in the code. Unfortunately, I didn't write it, so
understanding it fully could be a bit of a treat.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 24 Feb 1999 04:04:51 GMT, par### [at] mailfwicom (Ronald L.
Parker) wrote:
>It appears to be a little of both the parametric object and your
>bad coding. :) First, your bad coding:
>
>> function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
>> (sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
>> (sin(u) ^ _E2) * _Rn
>
>The z term is supposed to be based on sin(v), not sin(u).
>
>Now the bad news: there seems to be an issue with the parametric
>stuff that I don't fully understand. It seems like only things
>in the first quadrant, where both the sin and the cos are positive,
>get rendered correctly. I found an ABS in the code for exponentiation
>that could have caused the problem, but removing it didn't seem to
>make the problem go away. It's possible that I'm missing something
>somewhere else in the code. Unfortunately, I didn't write it, so
>understanding it fully could be a bit of a treat.
>
Thanks for the debug, Ron. I thought that seemed odd, but I looked at
the original equation several times and saw "theta" instead of "phi"
every time. Maybe I should sue my opthalmologist. Good luck on the
parametric code. FWIW, I will dig up the isosurface source and have a
look, but my compiler is broken so I can do no testing at the moment.
Incidentally, I turned your SuperPatch doc into a Windows help file
for my own use. If you want to add it to the distribution, let me
know and I'll clean up the index and send it along. If you want to
send info on changes for the next version, I'll gladly add it.
Jerry Anning
clem "at" dhol "dot" com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Twyst wrote:
> What does Lutz have to do with this? He writes a modeller
For the next version of Moray IF the Povray team adds it to the Program....
> -- He could make
> it as a mesh, or something, but (AFAIK) he's never hacked the pov code.
> (easier would be to make a plugin, I think)
>
> ( I hope this isn't another case of confusing a modeller with a
> renderer... )
>
Could be... but not sure....
>
> --
> ------------------------------------------------------------
> povray.doc -- An engaging tale about a spanish guy named Manual.
> ------------------------------------------------------------
>
> Psychomek wrote in message <36D2454B.25975805@cyberhighway.net>...
> >
> >
> >Anthony Bennett wrote:
> >
> >> Attention POV-Team
> >>
> >> I found a cool primitive that HAS got to be included in POV-Ray now! It
> >> is very cool!!!
> >> (Check out the upper folder [modelling], it has good stuff too).
> >>
> >> http://www.mhri.edu.au/~pdb/modelling/supertoroid/
> >
> >Ron or lutz please add this to the next versions! please!
> >
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jerry Anning <nos### [at] despamcom> wrote:
: FWIW
What does this mean?
--
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nieminen Mika wrote:
>
> Jerry Anning <nos### [at] despamcom> wrote:
>
> : FWIW
>
> What does this mean?
>
> --
> main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
> *_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp -*/
For what it's worth
I printed out a dictonary about web acronyms yesterday! ;-)
see http://www.whatis.com/
Marc
--
Marc Schimmler
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nieminen Mika wrote:
>
> Jerry Anning <nos### [at] despamcom> wrote:
>
> : FWIW
>
> What does this mean?
>
For What It's Worth
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Jerry Anning wrote in message <36d2ed6f.2561587@news.povray.org>...
>
>I coded it as a macro using the parametric object in SuperPatch. For
>some reason, it works fine with exponents of 1.0 (regular torus) but
>gives garbage for any other exponent. Is it the parametric object,
>the equations in the referenced page or my bad coding? I am going to
>redo it as a mesh object with those equations and see what happens.
>If anyone else wants to play with this, here is the macro I used. To
>repeat, it uses the SuperPatch. Sorry about the underscores and
>indenting, Ken!
>
Arrghh!!!! I can't get it to work at all.
Like this:
isosurface{Supertoroid(1,.3,1,1)}
Error: function is not defined
Like this:
isosurface{function{Supertoroid(1,.3,1,1)}}
Error: no matching brace in function
Like this:
#declare S=Supertoroid(1,.3,1,1)}
isosurface{S}
POV crashes (page fault in povray.exe)
If I add precompute to Supertoroid, the scene renders, but the isosurface is
just a box.
I must admit, this is the first time I tried the parametric{} isosurface, so
i may be doing something real stupid. But the crashing is suspicious. Maybe
a bug?
Margus.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 24 Feb 1999 23:35:47 +0200, "Margus Ramst"
<mar### [at] peakeduee> wrote:
>
>Jerry Anning wrote in message <36d2ed6f.2561587@news.povray.org>...
>>
>>I coded it as a macro using the parametric object in SuperPatch. For
>>some reason, it works fine with exponents of 1.0 (regular torus) but
>>gives garbage for any other exponent. Is it the parametric object,
>>the equations in the referenced page or my bad coding? I am going to
>>redo it as a mesh object with those equations and see what happens.
>>If anyone else wants to play with this, here is the macro I used. To
>>repeat, it uses the SuperPatch. Sorry about the underscores and
>>indenting, Ken!
>>
>
>Arrghh!!!! I can't get it to work at all.
>Like this:
>isosurface{Supertoroid(1,.3,1,1)}
>Error: function is not defined
>
>Like this:
>isosurface{function{Supertoroid(1,.3,1,1)}}
>Error: no matching brace in function
>
>Like this:
>#declare S=Supertoroid(1,.3,1,1)}
>isosurface{S}
>POV crashes (page fault in povray.exe)
>
>If I add precompute to Supertoroid, the scene renders, but the isosurface is
>just a box.
>I must admit, this is the first time I tried the parametric{} isosurface, so
>i may be doing something real stupid. But the crashing is suspicious. Maybe
>a bug?
>Margus.
First, the parametric object is an independent type in its own right,
not an isosurface function. The macro simply wraps a parametric
*object* up and makes it easily usable. Second, there seems to be an
issue about using #declare or #local with the parametric object.
Every variation of that that I try goes straight to GPF city during
the parse. Third, as Ron Parker mentioned, the parametric object
seems to want to be first quadrant only. Since the supertoroid has
suitable symmetry, you can get around that by making four rotated
copies of the object. Since #declare is out, you have to splat four
actual copies of the parametric code into a union in the macro. Here
is an (ugly, dog-slow) working version of the macro with a demo of how
to call it:
// Begin POV code
// _Rj is major radius
// _Rn is minor radius
// _E1 and _E2 are exponents
#macro Supertoroid(_Rj, _Rn, _E1, _E2)
union
{
parametric
{
function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
(sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
(sin(v) ^ _E2) * _Rn
<0, 0>, <2 * pi, 2 * pi>
<-(_Rj + _Rn + .1), -(_Rj + _Rn + .1), -(_Rj +_Rn +.1)>,
<_Rj +_Rn + .1, _Rj + _Rn + .1, _Rj + _Rn + .1>
accuracy .001
rotate <90, 0, 0>
}
parametric
{
function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
(sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
(sin(v) ^ _E2) * _Rn
<0, 0>, <2 * pi, 2 * pi>
<-(_Rj + _Rn + .1), -(_Rj + _Rn + .1), -(_Rj +_Rn +.1)>,
<_Rj +_Rn + .1, _Rj + _Rn + .1, _Rj + _Rn + .1>
accuracy .001
rotate <90, 0, 0>
rotate <0, 90, 0>
}
parametric
{
function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
(sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
(sin(v) ^ _E2) * _Rn
<0, 0>, <2 * pi, 2 * pi>
<-(_Rj + _Rn + .1), -(_Rj + _Rn + .1), -(_Rj +_Rn +.1)>,
<_Rj +_Rn + .1, _Rj + _Rn + .1, _Rj + _Rn + .1>
accuracy .001
rotate <90, 0, 0>
rotate <0, 180, 0>
}
parametric
{
function (cos(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
(sin(u) ^ _E1) * (_Rj + _Rn * (cos(v) ^ _E2)),
(sin(v) ^ _E2) * _Rn
<0, 0>, <2 * pi, 2 * pi>
<-(_Rj + _Rn + .1), -(_Rj + _Rn + .1), -(_Rj +_Rn +.1)>,
<_Rj +_Rn + .1, _Rj + _Rn + .1, _Rj + _Rn + .1>
accuracy .001
rotate <90, 0, 0>
rotate <0, 270, 0>
}
}
#end
// End POV code
You call it like this:
// Begin POV code
object
{
Supertoroid(8, 3, 2, .5)
texture
{
pigment { color Red }
normal { dents 2 scale <.1, 3, .2> }
finish { specular 1 roughness .002 }
}
rotate <-30. -30, 0>
}
// End POV code
I will post the mesh version somewhere in a day or so. Should be much
faster to render, although slower to parse. Good luck.
Jerry Anning
clem "at" dhol "dot" com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|