[Papervision3D] Mapping Longitude/Latitude coordinates on worldsphere

Mark Ireland markincuba at hotmail.com
Wed Aug 8 16:11:25 PDT 2007


Up and down the mouse seems ok but left and right seem to be the wrong way 
around.

>From: ripcurlx <christoph.atteneder at bwin.org>
>Reply-To: papervision3d at osflash.org
>To: papervision3D at osflash.org
>Subject: [Papervision3D] Mapping Longitude/Latitude coordinates on 
>worldsphere
>Date: Wed, 8 Aug 2007 07:14:30 -0700 (PDT)
>
>
>Hi,
>
>I´m new to papervision 3D and just wanted to implement a little earth
>example:
>
>...
>scene = new Scene3D(pv3dSprite);
>
>camera = new Camera3D();
>camera.z = -300;
>camera.zoom = 5;
>
>var rad : Number = 200;
>
>
>var material : BitmapMaterial = new BitmapMaterial((new Earth() as
>Bitmap).bitmapData);
>material.smooth = true;
>
>globe = new Sphere(material, rad, 24, 24);
>
>var point : Number3D = new Number3D();
>
>// coordinates of vienna(Austria)
>var lat : Number = 48.209206;
>var long : Number = 16.372778;
>
>point.x = rad*Math.cos(long)*Math.cos(lat);
>point.y = rad*Math.sin(long)*Math.cos(lat);
>point.z = rad*Math.sin(lat);
>
>var pointSphere : Sphere = new Sphere(new ColorMaterial(0xff0000), 2, 6, 
>8);
>pointSphere.x = point.x;
>pointSphere.y = point.y;
>pointSphere.z = point.z;
>
>globe.addChild(pointSphere);
>
>scene.addChild(globe);
>
>...
>
>Example
>
>http://www.cubeworx.net/ripcurlx/world/
>
>Everything worked pretty well, except the mapping of the long/lat
>coordinates on the globe. The calculation of the point is correct as far as
>I know, but it doesn´t work with the current material mapping of PV3D. On 
>my
>current globe Vienna is somewhere around Malaysia.
>
>Is there an easy possibility to control the texture mapping in depth or do 
>I
>have to implement a specific material - Or even better does anyone have
>already a solution for this problem? :-)
>
>greez and thx for any response,
>
>Christoph
>--
>View this message in context: 
>http://www.nabble.com/Mapping-Longitude-Latitude-coordinates-on-world-sphere-tf4236675.html#a12054104
>Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
>_______________________________________________
>Papervision3D mailing list
>Papervision3D at osflash.org
>http://osflash.org/mailman/listinfo/papervision3d_osflash.org

_________________________________________________________________
Advertisement: Fast track your education. Become TAFE qualified fast 
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2Fcareer%2Dresources%2Fsalary%2Dcentre%2F%3Ftracking%3Dsk%3Acon%3Ask%3Anine%3A0%3Ahot%3Asalarycentre&_t=764565661&_r=Seek_Main_AUG07_TAGlines&_m=EXT




More information about the Papervision3D mailing list