Last active
August 29, 2015 14:08
-
-
Save larsberg/960cb199405387d585dd to your computer and use it in GitHub Desktop.
Revisions
-
larsberg revised this gist
Oct 30, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,9 @@ static ofVec3f pointOnSphere(float theta, float phi, float radius = 50) { ofVec3f p; p.x = radius * cos(theta) * sin(phi); p.y = radius * cos(phi); p.z = radius * sin(theta) * sin(phi); return p; } -
larsberg created this gist
Oct 30, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ //theta in [0,TWO_PI), phi in [0,PI], and where radius in [0,infty) static ofVec3f pointOnSphere(float theta, float phi, float radius = 50) { ofVec3f p; p.x = radius * cos(theta) * sin(phi); p.y = radius * cos(phi); p.z = radius * sin(theta) * sin(phi); return p; }