Loading...
Logo
Processing Forum
Hello friends, I need your help. I have a point, exactly a coordinate (x,y,z) and I have to represent it on a 3D image. For example, I have NY coordinates (x,y,z) and i want to draw a point in this coordinates, how can I get it? How can I establish this coordinate in a 3D sphere?

Thanks a lot for your help

Replies(4)

"NY coordinates"? what do you mean?

just point(x, y, z) will plot a point at x, y, z.

> How can I establish this coordinate in a 3D sphere?

again, i don't know what you mean. you can constrain random vectors to the surface of a sphere of radius n by normalising them and multiplying by n.

(but i fear this is actually a question about polar to cartesian...)

post some code. or the original homework question. 8)
I'll go to explain our problem!

We have our 3D world image represented like a sphere, and now in that sphere we want to put the diferent countries, I mean, with a coordinate given in latitude and longitude (for example NY, Mexico, Germany...), we want to represent that in our sphere.

Could anyone give us a way to do that?
Have we got to take other procedure?

We attach our code. Thank you very much

import shapes3d.utils.*;
import shapes3d.animation.*;
import shapes3d.*;

Ellipsoid tierra;
int radio=200;

void LoadTierra()
{
  tierra = new Ellipsoid(this,30,40);
  tierra.setTexture("material2.jpg");
  tierra.setRadius(radio);

  tierra.drawMode(Shape3D.TEXTURE); 
}
void DrawTierra(){
 tierra.draw();

}




This link helped me a lot when dealing with spherical coordinates: http://en.wikipedia.org/wiki/Spherical_coordinate_system
x=r \, \sin\theta \, \cos\varphi \quad
y=r \, \sin\theta \, \sin\varphi \quad
z=r \, \cos\theta \quad

> I mean, with a coordinate given in latitude and longitude (for example NY

then why didn't you say that in the first post? 8)