Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Some quick googling reveals the definition of the aspect angle.</p> <p><a href="http://www.answers.com/topic/aspect-angle" rel="nofollow">http://www.answers.com/topic/aspect-angle</a></p> <p>It's the angle between the geographic north on the northern hemisphere and the geographic south on the southern hemisphere. So basically it's a measure how much a slope faces the closest pole. </p> <p>If your world is planar as opposed to spherical it will simplify things, so yes - A 2D problem. I'll make this assumption having the following implications:</p> <ul> <li>In a spherical world the north pole is a point on the sphere. In a planar world the "pole" is a plane at infinity. Think about a plane somewhere far away in your world denoting "north". Only the normal of this plane is important in this task. The unit normal of this plane is <strong>N</strong>(nz,ny,nz).</li> <li>Up is a vector pointing up <strong>U</strong>(ux,uy,yz). This is the unit normal vector of the ground plane.</li> </ul> <p>The unit normal vector of the plane <strong>V</strong>(a,b,c) can now be projected onto a vector <strong>P</strong> on the ground plane as usual: <strong>P</strong> = <strong>V</strong> - (<strong>V</strong> dot <strong>U</strong>) <strong>U</strong></p> <p>Now it's easy to measure the aspect angle of the plane - It's the angle between the "pole"-plane <strong>N</strong> and the projected plane normal <strong>P</strong> given by <em>acos</em>(<strong>P</strong> dot <strong>N</strong>).</p> <p>Since north is positive Y-axis for you we have <strong>N</strong> = (0, 1, 0). And then I guess you have up is <strong>U</strong> = (0, 0, 1), positive Z. This will simplify things even more - To project on the ground plane we just strip the Z-part. The aspect angle is then the angle between (a,b) and (0,1). </p> <pre><code>aspectAngle = acos(b / sqrt(a*a + b*b)) </code></pre> <p>Note that planes parallell with the ground plane does not have a well-defined aspect angle since there is no slope to measure the aspect angle from.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload