|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi. I'm looking to make a soccer ball-like object that combines
two functions into one isosurface:
A: the ball
and B: The hexagons on the ball. I want these hexagons to be raised, which
is why
I'm using an isosurface and not a sphere with a function as a surface
normal.
In addition I'm trying to use random numbers to generate random hexagon
colors
on this ball.
Can someone tell me what's wrong with this code? I have several problems
that have stumped me.
1. Both the hexagon pigment and the isosurface function"FHexagon" tend to
create
the hexagons asymmetrically, so that at the poles of my sphere there are
hexagons,
and these "extrude" downwards along the y axis to the opposite pole. I'd
like
hexagons all around the equator as well.
2. If I use a rounded box instead of a sphere
(function "rounded_box" <3> gets me a sphere)
the pigment seems to map a little more normally, but the isosurface
function still looks wrong and keeps 'cubing' my sphere to boot. My
temporary fix is to just contain it with a sphere instead of a box.
3. The pigments in my hexagon pattern (which are semi random) seem to
affect whether the isosurface shows up at all and change the shape. I
guess I should declare one pigment for the function and a different one for
the texture, but if I can work around this I'd like to. In any case, I
seem to remember a page with a tutorial on how to make a pigment 3D, and
the example used was a crackle pattern made into an isosurface function and
then added to a sphere function to get a crackly sphere. How does that
work? (and what happened to the page?)
code below:
#declare PHexagon =
pigment {hexagon
color rgb <2,2,2>+10*rand(RandColor)
color rgb <2,4,2>*rand(RandColor)
color rgb <1,2,4>-rand(RandColor)
}
#declare FHexagon = function {pigment {PHexagon}}
#declare FRBox = function {"rounded_box" <3>}
#declare FBoxSurface =
function {FRBox
| FHexagon(x,y,z)*10
//The or bar is there because "+" and "&" never seem to work...
}
isosurface {
function {FBoxSurface}
contained_by {sphere {<0,0,0>,3}}
//but what I really want is a box so you can see
//the hexagon ridges...
eval threshold 5 method 2
//tweaking the threshold helps make it visible, but not correct ...
texture {
pigment{function{FHexagon}
color_map {
[0 color rgbf<rand(RandColor)*rand(RandColor),
rand(RandColor),
rand(RandColor),0>]
[.3 color rgbf<rand(RandColor).4,
rand(RandColor)^2,
rand(RandColor)*rand(RandColor),0>]
[1 color
rgbf<rand(RandColor)+.5,rand(RandColor)+.3,2*rand(RandColor)^2+.5,0>]
}//end color map
}//end pigment
//normal {function {FHexagon(x*10,y*10,z*10)*10}scale 10 rotate x*-90}
//The normal looks okay but it's not what I want.
}//end texture
finish {phong 1 phong_size 2 ambient .2}
rotate x*90} //end iso
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
to get hexagons to wrap around a sphere, i think you need megapov's uv
mapping. that's just a guess. maybe someone with better knowledge will
comment.
CreeD wrote:
>
> Hi. I'm looking to make a soccer ball-like object that combines
> two functions into one isosurface:
> A: the ball
> and B: The hexagons on the ball. I want these hexagons to be raised, which
> is why
> I'm using an isosurface and not a sphere with a function as a surface
> normal.
>
> In addition I'm trying to use random numbers to generate random hexagon
> colors
> on this ball.
>
> Can someone tell me what's wrong with this code? I have several problems
> that have stumped me.
>
> 1. Both the hexagon pigment and the isosurface function"FHexagon" tend to
> create
> the hexagons asymmetrically, so that at the poles of my sphere there are
> hexagons,
> and these "extrude" downwards along the y axis to the opposite pole. I'd
> like
> hexagons all around the equator as well.
>
> 2. If I use a rounded box instead of a sphere
> (function "rounded_box" <3> gets me a sphere)
> the pigment seems to map a little more normally, but the isosurface
> function still looks wrong and keeps 'cubing' my sphere to boot. My
> temporary fix is to just contain it with a sphere instead of a box.
>
> 3. The pigments in my hexagon pattern (which are semi random) seem to
> affect whether the isosurface shows up at all and change the shape. I
> guess I should declare one pigment for the function and a different one for
> the texture, but if I can work around this I'd like to. In any case, I
> seem to remember a page with a tutorial on how to make a pigment 3D, and
> the example used was a crackle pattern made into an isosurface function and
> then added to a sphere function to get a crackly sphere. How does that
> work? (and what happened to the page?)
>
> code below:
>
> #declare PHexagon =
> pigment {hexagon
> color rgb <2,2,2>+10*rand(RandColor)
> color rgb <2,4,2>*rand(RandColor)
> color rgb <1,2,4>-rand(RandColor)
> }
>
> #declare FHexagon = function {pigment {PHexagon}}
>
> #declare FRBox = function {"rounded_box" <3>}
>
> #declare FBoxSurface =
> function {FRBox
> | FHexagon(x,y,z)*10
> //The or bar is there because "+" and "&" never seem to work...
> }
>
> isosurface {
>
> function {FBoxSurface}
>
> contained_by {sphere {<0,0,0>,3}}
> //but what I really want is a box so you can see
> //the hexagon ridges...
>
> eval threshold 5 method 2
> //tweaking the threshold helps make it visible, but not correct ...
>
> texture {
> pigment{function{FHexagon}
> color_map {
> [0 color rgbf<rand(RandColor)*rand(RandColor),
> rand(RandColor),
> rand(RandColor),0>]
> [.3 color rgbf<rand(RandColor).4,
> rand(RandColor)^2,
> rand(RandColor)*rand(RandColor),0>]
> [1 color
> rgbf<rand(RandColor)+.5,rand(RandColor)+.3,2*rand(RandColor)^2+.5,0>]
>
> }//end color map
> }//end pigment
> //normal {function {FHexagon(x*10,y*10,z*10)*10}scale 10 rotate x*-90}
> //The normal looks okay but it's not what I want.
> }//end texture
> finish {phong 1 phong_size 2 ambient .2}
> rotate x*90} //end iso
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Hi. I'm looking to make a soccer ball-like object that
combines
> two functions into one isosurface:
> A: the ball
> and B: The hexagons on the ball. I want these hexagons to be
raised, which
> is why
> I'm using an isosurface and not a sphere with a function as a
surface
> normal.
Hmm ... afaik a soccer-ball not only consists of hexagons but
also of pentagons ....
mostly the hexas are white and the pentas are black ... this is
needed, because of the "sphere-ing"
--
,', Jan Walzer \V/ http://wa.lzer.net ,',
',',' student of >|< mailto:jan### [at] lzernet ',','
' ComputerScience /A\ +49-177-7403863 '
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 6 Aug 2000 15:28:47 -0400, "CreeD" <mes### [at] nqinet> wrote:
>Hi. I'm looking to make a soccer ball-like object that combines
>two functions into one isosurface:
>A: the ball
>and B: The hexagons on the ball.
A soccer ball is an icosadodecahedron, meaning that every vertex is
common for two hexagons and a pentagon. Simply wrapping a hexagon
pigment won't help. Actually it's impossible as hexagons pack the
plane completely and hence leave no space for 'folding'.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG e-mail : pet### [at] tagpovrayorg
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
You cannot do this with a hexagon pigment; a soccer ball is a truncated
icosahedron (or icosadodecahedron as Peter said), meaning if you take an
icosahedron and chop off the points you will get a soccer ball. I'm not sure an
isosurface is your best bet; you could define individual hexagons/pentagons and
tile them.
CreeD wrote:
> Hi. I'm looking to make a soccer ball-like object that combines
> two functions into one isosurface:
> A: the ball
> and B: The hexagons on the ball. I want these hexagons to be raised, which
> is why
> I'm using an isosurface and not a sphere with a function as a surface
> normal.
>
> In addition I'm trying to use random numbers to generate random hexagon
> colors
> on this ball.
>
> Can someone tell me what's wrong with this code? I have several problems
> that have stumped me.
>
> 1. Both the hexagon pigment and the isosurface function"FHexagon" tend to
> create
> the hexagons asymmetrically, so that at the poles of my sphere there are
> hexagons,
> and these "extrude" downwards along the y axis to the opposite pole. I'd
> like
> hexagons all around the equator as well.
[snip]
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
Please visit my website: http://www.faricy.net/~davidf/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
CreeD wrote:
>
> Hi. I'm looking to make a soccer ball-like object that combines
> two functions into one isosurface:
> A: the ball
> and B: The hexagons on the ball.
> 8< ... Snip ...
Others has already mentioned that you need hexagons
and pentagons to make a "soccer ball".
In this posting you'll find the 3D - co ordinates for
the corners of these hexagons and pentagons:
news://news.povray.org/38E54FA5.98071D16%40hotmail.com
("Bumpy CSG-sphere" posted to povray.text.scene-files
1. April -00)
I can explain further if you are interested.
There is a soccer ball -like image at my web page.
Tor Olav
--
mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ryan constantine <rco### [at] yahoocom> wrote:
: to get hexagons to wrap around a sphere, i think you need megapov's uv
: mapping.
Isosurfaces don't have support for uv-mapping.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
thanks for the tip.
Warp wrote:
>
> ryan constantine <rco### [at] yahoocom> wrote:
> : to get hexagons to wrap around a sphere, i think you need megapov's uv
> : mapping.
>
> Isosurfaces don't have support for uv-mapping.
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|