We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Here is my code :
PImage background;
PImage globe;
void setup() {
size (1025,576,P3D);
background = loadImage("luarangkasa.jpg");
globe = loadImage("bumi.jpg");
}
void draw() {
background(background);
pushMatrix();
translate(500,300);
lights();
rotateY(radians(HALF_PI* frameCount));
sphere(150);
texture(globe);
popMatrix();
}
Answers
https://forum.processing.org/two/discussion/13500/applying-a-texture-to-a-sphere
This is the code posted by @TfGuy44:
it works mr.cameyo, i need some help again, How to remove the existing line on the sphere? i'd use noStroke(); and the line still in there
Try (un-tested)
Kf
doesn't work my friend, have another idea? that's make the globe is disappear
Try prev posts:
https://forum.processing.org/two/search?Search=setTexture
https://forum.processing.org/two/discussion/comment/77408/#Comment_77408
Kf
Try:
Still works great. What's the problem?
@mohammadarifien --
I don't know what bumi.jpg is, but my guess is that the line is an artifact of your image.
Notice that the image that @TfGuy44 is using is designed to wrap around into a globe -- the left side and the right side match up perfectly. Does bumi.jpg do that? If the two sides don't match then you are going to see a line no matter what -- you need to fix your image.
thanks a lot guys i appreciated it