 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
same pigment, such as Blue_Sky, on one hemisphere and use the mirror
of that texture on the other hemisphere. I have tried rotating the
Thanks in advance for any help,
Bob
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Wed, 23 May 2001 23:38:36 -0700, Bob Franke
<bob### [at] hotmail com> wrote:
>same pigment, such as Blue_Sky, on one hemisphere and use the mirror
>of that texture on the other hemisphere. I have tried rotating the
>Thanks in advance for any help,
Scale it -1 along the axis you want to mirror it about.
Mirror x: scale <-1,1,1>
Mirror y: scale <1,-1,1>
Mirror z: scale <1,1,-1>
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Peter Popov wrote:
>
> On Wed, 23 May 2001 23:38:36 -0700, Bob Franke
> <bob### [at] hotmail com> wrote:
>
> >the same pigment, such as Blue_Sky, on one hemisphere and use the
> >mirror of that texture on the other hemisphere. I have tried
> >Thanks in advance for any help,
>
> Scale it -1 along the axis you want to mirror it about.
>
> Mirror x: scale <-1,1,1>
> Mirror y: scale <1,-1,1>
> Mirror z: scale <1,1,-1>
And if that axis is not parallel to any of the coordinate axes:
#local vA=vnormalize(Axis_of_Mirroring);
matrix <1-2*vA.x*vA.x, -2*vA.x*vA.y, -2*vA.x*vA.z,
matrix <-2*vA.x*vA.y, 1-2*vA.y*vA.y, -2*vA.y*vA.z,
matrix <-2*vA.x*vA.z, -2*vA.y*vA.z, 1-2*vA.z*vA.z,
0, 0, 0 >
This is untested, but I'm confident it works.
Regards,
John
--
ICQ: 46085459
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
John VanSickle wrote:
>
> And if that axis is not parallel to any of the coordinate axes:
>
> #local vA=vnormalize(Axis_of_Mirroring);
> matrix <1-2*vA.x*vA.x, -2*vA.x*vA.y, -2*vA.x*vA.z,
> matrix <-2*vA.x*vA.y, 1-2*vA.y*vA.y, -2*vA.y*vA.z,
> matrix <-2*vA.x*vA.z, -2*vA.y*vA.z, 1-2*vA.z*vA.z,
> 0, 0, 0 >
>
> This is untested, but I'm confident it works.
>
Surely not the way it is, better use (untested too BTW):
#local vA=vnormalize(Axis_of_Mirroring);
matrix <1-2*vA.x*vA.x, -2*vA.x*vA.y, -2*vA.x*vA.z,
-2*vA.x*vA.y, 1-2*vA.y*vA.y, -2*vA.y*vA.z,
-2*vA.x*vA.z, -2*vA.y*vA.z, 1-2*vA.z*vA.z,
0, 0, 0 >
Anyway i would not be able to write this down straigt away like you, would
rather use the 'rotate, scale, rotate back' method.
Christoph
--
Christoph Hormann <chr### [at] gmx de>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Christoph Hormann wrote:
>
> John VanSickle wrote:
> >
> > And if that axis is not parallel to any of the coordinate axes:
> >
> > #local vA=vnormalize(Axis_of_Mirroring);
> > matrix <1-2*vA.x*vA.x, -2*vA.x*vA.y, -2*vA.x*vA.z,
> > matrix <-2*vA.x*vA.y, 1-2*vA.y*vA.y, -2*vA.y*vA.z,
> > matrix <-2*vA.x*vA.z, -2*vA.y*vA.z, 1-2*vA.z*vA.z,
> > 0, 0, 0 >
> >
> > This is untested, but I'm confident it works.
> >
>
> Surely not the way it is, better use (untested too BTW):
>
> #local vA=vnormalize(Axis_of_Mirroring);
> matrix <1-2*vA.x*vA.x, -2*vA.x*vA.y, -2*vA.x*vA.z,
> -2*vA.x*vA.y, 1-2*vA.y*vA.y, -2*vA.y*vA.z,
> -2*vA.x*vA.z, -2*vA.y*vA.z, 1-2*vA.z*vA.z,
> 0, 0, 0 >
Note to self: Edit better when using cut-and-paste...
> Anyway i would not be able to write this down straight away like you,
Only took me about five minutes to work out the matrix.
> would rather use the 'rotate, scale, rotate back' method.
Yeah, that would work, too.
--
ICQ: 46085459
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> And if that axis is not parallel to any of the coordinate axes:
> #local vA=vnormalize(Axis_of_Mirroring);
> matrix [...]
You know, there are some of these days on the net, I enjoy more than
average, they make me smile in a certain way. It happens sometimes on
the USENET but also on this, relative small, server. For example, a
thread with a peculiar problem is going on a few days;
1. A day, or two, after you think, everything is said and
explained, Chis Colefax suddenly comes 'crawling from under his stone'.
He gives a simple yet elegant solution to the problem, in a way that
makes all of us hurry, to catch our lower jaw before it hits the
ground.
Or ...
2. the problem discussed is about some esoteric transformation.
After a possible solution or two published, John VanSickle appears with
4-5 lines of nifty code, containing the word 'matrix'. And then the
'MatrixMan' has the guts to say:
> This is untested, but I'm confident it works.
... and it does, not just for this case but for all related.
I love it,
thank you,
Ingo
--
Photography: http://members.home.nl/ingoogni/
Pov-Ray : http://members.home.nl/seed7/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
This is what I love about the Internet, got a problem, put my question out
there and check the next day for a bunch of great answers. The negative
scale method works for me. If I have more time I will check out the
matrix. Now I can get back to modeling my ladybug.
Thanks guys,
Bob
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Bob Franke wrote:
>
> This is what I love about the Internet, got a problem, put my question out
> there and check the next day for a bunch of great answers.
Well, that is at least true for this part of the internet.
--
Ken Tyler
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
ingo wrote:
>
> You know, there are some of these days on the net, I enjoy more than
> average, they make me smile in a certain way. It happens sometimes on
> the USENET but also on this, relative small, server. For example, a
> thread with a peculiar problem is going on a few days;
> 1. A day, or two, after you think, everything is said and
> explained, Chis Colefax suddenly comes 'crawling from under his
> stone'. He gives a simple yet elegant solution to the problem, in a
> way that makes all of us hurry, to catch our lower jaw before it hits
> the ground.
> Or ...
> 2. the problem discussed is about some esoteric transformation.
> After a possible solution or two published, John VanSickle appears
> with 4-5 lines of nifty code, containing the word 'matrix'. And then
> the 'MatrixMan' has the guts to say:
> > This is untested, but I'm confident it works.
> ... and it does, not just for this case but for all related.
One of my Throughly Useful Macros can also do mirroring:
Stretch(Vector,-1)
Silly, not to think of it.
Regards,
John
--
ICQ: 46085459
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |