POV-Ray : Newsgroups : povray.advanced-users : Bizzare space mapping problem Server Time
5 Jul 2024 16:27:03 EDT (-0400)
  Bizzare space mapping problem (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Orchid XP v3
Subject: Bizzare space mapping problem
Date: 7 Sep 2007 15:39:24
Message: <46e1a8ec$1@news.povray.org>
I'm attempting to solve a problem so fiddly that it's really quite hard 
to explain what I'm even trying to *do*!

Basically, I want to make a 2D pattern with seemless repeats out of a 
normal POV-Ray 3D pattern. However, I can't seem to find a way to take a 
flat 2D grid and bend it into some kind of 3D form in such a way that 
the pattern has a uniform frequency everywhere.

Initially, I mapped 2D coordinates to 3D points on the surface of a 
sphere. As you'll have probably figured out, this causes the "poles" to 
produce veeeery stretched patterns!

Next I tried mapping to the surface of a torus. That didn't really work 
either, since the inside radius of a torus is smaller than the outside 
radius, so you still get horisontal or vertical bands of stretching. You 
can minimise it be increasing the major radius and decreasing the minor 
one, but you can't actually get rid of it.

Is the problem I'm attempting to solve mathematically impossible, or 
does somebody know how to do this?

-- 
http://blog.orphi.me.uk/


Post a reply to this message

From: Warp
Subject: Re: Bizzare space mapping problem
Date: 7 Sep 2007 15:58:37
Message: <46e1ad6d@news.povray.org>
Can you describe, even at a conceptual level, how you could map a 2D
pattern onto a 3D shape with no stretching whatsoever?

-- 
                                                          - Warp


Post a reply to this message

From: Orchid XP v3
Subject: Re: Bizzare space mapping problem
Date: 7 Sep 2007 16:01:29
Message: <46e1ae19@news.povray.org>
Warp wrote:
>   Can you describe, even at a conceptual level, how you could map a 2D
> pattern onto a 3D shape with no stretching whatsoever?

I've spent about 20 minutes attempting to bend my mind around such a 
concept... Apparently my mind is insufficiently bendy.

I know it's impossible to map *a sphere* onto a flat grid without 
distortion, but I'm uncertain as to whether there exists *any* 3D 
surface can be mapped to a 2D one without disturtion.

-- 
http://blog.orphi.me.uk/


Post a reply to this message

From: Warp
Subject: Re: Bizzare space mapping problem
Date: 7 Sep 2007 16:02:18
Message: <46e1ae4a@news.povray.org>
Orchid XP v3 <voi### [at] devnull> wrote:
> I know it's impossible to map *a sphere* onto a flat grid without 
> distortion, but I'm uncertain as to whether there exists *any* 3D 
> surface can be mapped to a 2D one without disturtion.

  I think some mathematician specialized in topology would have some
rather interesting things to say about that...

-- 
                                                          - Warp


Post a reply to this message

From: Kyle
Subject: Re: Bizzare space mapping problem
Date: 7 Sep 2007 16:06:20
Message: <ujb3e3t6cotucrsh64g932d2icofcv2urc@4ax.com>
I understand the concept you are trying to grasp, and I don't have an answer for that.
 However, depending on your use of the 2D pattern, and the 3D pattern you're trying to
use, would flipping the
pattern maybe work?  Something like this...


#declare b1 =
  box { 
    0,<1,1,0.000000000000001> 
    pigment { agate scale 1/50 } 
  }

#declare tile =
  union {
    object { b1 }
    object { b1 rotate y*180 }
    object { b1 rotate x*180 }
    object { b1 rotate <180, 180, 0> }
  }

object { tile translate -x*2 }
object { tile }
object { tile translate x*2 }


Post a reply to this message

From: Orchid XP v3
Subject: Re: Bizzare space mapping problem
Date: 7 Sep 2007 16:06:26
Message: <46e1af42$1@news.povray.org>
Warp wrote:
> Orchid XP v3 <voi### [at] devnull> wrote:
>> I know it's impossible to map *a sphere* onto a flat grid without 
>> distortion, but I'm uncertain as to whether there exists *any* 3D 
>> surface can be mapped to a 2D one without disturtion.
> 
>   I think some mathematician specialized in topology would have some
> rather interesting things to say about that...

Yes.

...do you happen to know any? :-}

-- 
http://blog.orphi.me.uk/


Post a reply to this message

From: Orchid XP v3
Subject: Re: Bizzare space mapping problem
Date: 7 Sep 2007 16:08:56
Message: <46e1afd8$1@news.povray.org>
Kyle wrote:
> I understand the concept you are trying to grasp, and
> I don't have an answer for that.  However, depending 
> on your use of the 2D pattern, and the 3D pattern
> you're trying to use, would flipping the pattern maybe work?

Mmm, perhaps. I'll try it...

-- 
http://blog.orphi.me.uk/


Post a reply to this message

From: Tim Attwood
Subject: Re: Bizzare space mapping problem
Date: 7 Sep 2007 17:31:11
Message: <46e1c31f$1@news.povray.org>
> I'm attempting to solve a problem so fiddly that it's really quite hard to 
> explain what I'm even trying to *do*!
>
> Basically, I want to make a 2D pattern with seemless repeats out of a 
> normal POV-Ray 3D pattern. However, I can't seem to find a way to take a 
> flat 2D grid and bend it into some kind of 3D form in such a way that the 
> pattern has a uniform frequency everywhere.
>
> Initially, I mapped 2D coordinates to 3D points on the surface of a 
> sphere. As you'll have probably figured out, this causes the "poles" to 
> produce veeeery stretched patterns!

Do you mean like a uv_mapping pigment?
pigment {uv_mapping checker White Blue scale 0.05}
Or a cylindrical pigment warp?

> Next I tried mapping to the surface of a torus. That didn't really work 
> either, since the inside radius of a torus is smaller than the outside 
> radius, so you still get horisontal or vertical bands of stretching. You 
> can minimise it be increasing the major radius and decreasing the minor 
> one, but you can't actually get rid of it.
>
> Is the problem I'm attempting to solve mathematically impossible, or does 
> somebody know how to do this?

In theory some shapes are impossible to tile evenly*.  The area of a sphere 
is
4*pi*r^2, that makes it an irrational number, there is no way to divide the
surface evenly*, because the tiles have rational areas*.  In  practice you
can get pretty close by covering the sphere with a geodesic pattern of some
kind, like a soccer ball.

There are one-to-one projections from flat areas to spheres though.
http://en.wikipedia.org/wiki/Mollweide_projection

* if the tiles are flat with straight line edges. A sphere can be tiled by
cutting it up into 8 equal non-flat parts.


Post a reply to this message

From: Mike Williams
Subject: Re: Bizzare space mapping problem
Date: 7 Sep 2007 17:49:13
Message: <h8YktDAfmb4GFwVp@econym.demon.co.uk>
Wasn't it Orchid XP v3 who wrote:
>I'm attempting to solve a problem so fiddly that it's really quite hard 
>to explain what I'm even trying to *do*!
>
>Basically, I want to make a 2D pattern with seemless repeats out of a 
>normal POV-Ray 3D pattern. However, I can't seem to find a way to take a 
>flat 2D grid and bend it into some kind of 3D form in such a way that 
>the pattern has a uniform frequency everywhere.
>
>Initially, I mapped 2D coordinates to 3D points on the surface of a 
>sphere. As you'll have probably figured out, this causes the "poles" to 
>produce veeeery stretched patterns!
>
>Next I tried mapping to the surface of a torus. That didn't really work 
>either, since the inside radius of a torus is smaller than the outside 
>radius, so you still get horisontal or vertical bands of stretching. You 
>can minimise it be increasing the major radius and decreasing the minor 
>one, but you can't actually get rid of it.
>
>Is the problem I'm attempting to solve mathematically impossible, or 
>does somebody know how to do this?

Do you mean something like this?


camera { location  <0, 0, -7> look_at <0, 0, 0>}

#declare Pattern = function{pigment{marble turbulence 1}}
                    
plane { z,0
  pigment { function {Pattern(cos(x),cos(y),sin(x)*sin(y)).grey}
    color_map { [0.0 rgb <1,0,0>]
                [0.5 rgb <1,1,0>]
                [1.0 rgb <0,0,1>]
    }
    scale 1/pi
  }
  finish {ambient 1}
}



The pattern does get warped and twisted in order to unfold it into 2D,
but it's done in a way that is symmetrical in x and y. For some patterns
the warp effect isn't very noticeable but patterns like "brick",
"hexagon", "radial" and "spiral2" are clearly weirdly twisted.

The repeat region is <-1,-1> to <1,1> because of the "scale 1/pi".

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Warp
Subject: Re: Bizzare space mapping problem
Date: 8 Sep 2007 04:51:45
Message: <46e262a0@news.povray.org>
Orchid XP v3 <voi### [at] devnull> wrote:
> Basically, I want to make a 2D pattern with seemless repeats out of a 
> normal POV-Ray 3D pattern. However, I can't seem to find a way to take a 
> flat 2D grid and bend it into some kind of 3D form in such a way that 
> the pattern has a uniform frequency everywhere.

  Now I see that you are not requiring for the surface to be finite and
closed. Thus the solution is simple: Map it onto a cylinder.

-- 
                                                          - Warp


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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