# transforming a hemisphere

This topic is 2918 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hi,

i have problem trying to transform my hemisphere based on the vertex normal. so what im trying to do is to build a hemiospehre of each vertex with radius 1. the hemisphere looks like this:

http://hinjang.com/articles/media/skyModel00.png

where the up value is the normal of each vertex. so for example if my vertex normal is (0, 1, 0) (y is the up value) i can simply use the normal hemisphere formula that can be found in here

http://en.wikipedia.org/wiki/Spherical_coordinate_system

(with few changes considering y is the up).

now the problem is when i have the normal not pointing up, eg :

normal = normalize(1, 1, 0)

how can i transform the hemisphere so it follows the normal of the vertex? so for example if i know all the point to build a hemisphere for normal (0, 1, 0), how can i find the coordinate for a hemispehre for normal normalize(1,1,0)?

##### Share on other sites
Sounds like you are just needing a rotation.
You could for example get the cosinus of the rotation-angle by the dot-product of
(0,1,0) and normalize new_normal
Now you can get the rotation-axis by the cross-product of these two vectors.
That is all information you need for rotating the hemisphere right in place.

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632995
• Total Posts
3009773
• ### Who's Online (See full list)

There are no registered users currently online

×