Skip to main content

Questions tagged [sphere]

A geometric primitive in which all points have the same distance to a midpoint.

Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

The stated assertion that a point outside some intermediate Minimum Enclosing Sphere is on the boundary of the final Minimum Enclosing Sphere seems unsupportable. It is true only for the first point ...
WernerJuengst's user avatar
7 votes
1 answer
1k views

Suppose you have two overlapping spheres \$A\$ and \$B\$, with centers \$c_{A}\$ and \$c_{B}\$ and radii \$r_{A}\$ and \$r_{B}\$. Let \$n = \operatorname{normalize}(c_{B} - c_{A})\$ be the collision ...
Ram's user avatar
  • 73
1 vote
1 answer
126 views

I'm trying to ray-cast mouse clicks to the surface of a sphere (from which point, I'm going to get the coordinates of the vertex of the sphere's mesh that are closest to the click). The following ...
Jax's user avatar
  • 474
0 votes
1 answer
113 views

I'm currently implementing a method for subdividing an icosahedron found here that isn't quite working as expected due to the artifacts created (and the way the triangles are oriented) The problem ...
Chillzy's user avatar
  • 47
0 votes
1 answer
242 views

What I want to achieve I want to generate sphere planet world, seamless of course, for RTS game like Planetary Annihilation: TITANS, which means I want: place walking agents on sphere, move them on a ...
Tony Max's user avatar
1 vote
2 answers
314 views

I'm making a game in OpenGL with C++. I have a problem with my vertices or texture coordinates - there's a seam visible on the sphere where the texture wraps around: If I use "nearest" ...
Gaëtan S's user avatar
0 votes
1 answer
179 views

I am working on a game. The camera is freely rotatable by the user. The background is displayed from an equirectangular image. I need to know which pixel of the background image is located under the ...
Matthew Carson's user avatar
0 votes
0 answers
122 views

I currently have a 3D model of the moon. You are able to pick a point on the moon and it takes longitude and latitude coordinates of that point and generates a mesh based on the heightmap. So if you ...
ElliotPutnam's user avatar
0 votes
0 answers
146 views

I recently took an interest in sphere topologies to find which one is the best. The most popular one seems to be the fibonacci sphere. So I went and did some research and found some C code online that ...
Chillzy's user avatar
  • 47
0 votes
1 answer
166 views

I have a number of spheres in my scene. I also have another object that I want to scale depending on the amount of a selected sphere that is visible (it can be occluded by multiple other spheres ...
BinaryGuy's user avatar
  • 141
0 votes
1 answer
203 views

I'm currently making a planet and for that, I added noise, to create terrain on the surface. The method I'm using is creating simplex noise (that ends up looking like the image below) And I write ...
Chillzy's user avatar
  • 47
1 vote
1 answer
769 views

For a game I'm making, I have to tessellate an octahedron into a sphere on the GPU (shaders). What I've done is I've successfully tessellated the faces, but I'm having trouble subdividing more spaces, ...
Chillzy's user avatar
  • 47
0 votes
1 answer
202 views

For a project of mine, I need to render spheres without loading a pre-made model or using built-in functions. I found this bit of code on the internet that seems to work but I really want to ...
Chillzy's user avatar
  • 47
1 vote
1 answer
1k views

I am currently researching the difference between Cube Mapping and Spherical Mapping. Wikipedia says the following: In the majority of cases, cube mapping is preferred over the older method of sphere ...
Angry Red Panda's user avatar
0 votes
1 answer
108 views

I'm developing a rigid body physics engine and currently have accurately calculated the angular velocity of the sphere when impulsed. Unfortunately though, I'm not calculating the velocity correctly ...
Joe's user avatar
  • 1
0 votes
0 answers
946 views

So, I have this problem, even when I apply a small amount of force, the balls seem to get pushed away easily. Here's how they should behave (GIF from 8 ball pool game): And here's how I have it : ...
Haseeb Ali's user avatar
2 votes
1 answer
10k views

I'm trying to make a 3d model of the Earth (it doesn't have to be a fully-accurate geoid), but whenever I try with a map as a material's albedo to do so, it looks kind of weird and wonky. I assume ...
ThePizzaMan's user avatar
2 votes
0 answers
319 views

I am working on a game the ultimately will be a tactical game on the surface of a sphere. To model the surface of a sphere I have chosen to use an iterated icosphere, where each face is iterated quite ...
Amabaku's user avatar
  • 21
0 votes
0 answers
146 views

I'm making 3d basketball throwing simulator and I'm stuck with the sphere-ring collision detection. It's easy to find the collision normal if we have the collision point with the ring, but I don't ...
Ahmad's user avatar
  • 1
1 vote
1 answer
884 views

I created a uv sphere model in Blender, and I'm loading it as an obj into my OpenGL game. I'm attempting to model a 2d image as a texture for this sphere to make the moon, but I've run into this issue....
TheGamerPlayz's user avatar
0 votes
2 answers
749 views

I'm trying to generate points for a sphere by subdividing the space of spherical coordinate in res sector and res slices. At first I did my own implementation, but it wasn't working. After a while I ...
Syrinxos's user avatar
1 vote
1 answer
501 views

I am experimenting with procedural techniques to generate planetary terrain. I have close to zero knowledge so I started with something simple, using perlin noise and domain distortion. My goal is to ...
Gonstasp's user avatar
  • 111
2 votes
1 answer
564 views

I'm curious what is the valid calculation of a projectile trajectory in case when: surface is not flat but spherical like a planet drag is enabled (for example 0.1) and we are in 3D I've found ...
Panthesilea's user avatar
1 vote
0 answers
185 views

I am implementing a sphere to sphere collision resolution and I am a little confused on where to start. First question, is there a standard way that games/engines do sphere to sphere collision ...
user2940320's user avatar
1 vote
1 answer
377 views

I have a sphere and in Fragment shader, I have available lat / lon position (in radians) for every fragment. I have a texture of a single dot. I need to map this single dot (or any other texture) ...
Martin Perry's user avatar
  • 1,126
0 votes
1 answer
2k views

First of all please note that the game is in 3d and Not 2d The image below is seen from above. What I am trying to do is find a random point 2 - 3 meters around the player. However I am not quite ...
Marc Rasmussen's user avatar
1 vote
1 answer
325 views

There is an fantastic answer by DMGregory here where he explains how to calculate and generate the vertices of an UV Sphere: OpenGL calculate UV sphere vertices Based on his code, how can we change ...
phcs93's user avatar
  • 121
0 votes
1 answer
1k views

I am doing an attempt to make a 3D snake game, as an experiment but I am still a beginner. I have a Sphere that I wish to dynamically resize to be, let's say, the ...
silviubogan's user avatar
0 votes
0 answers
214 views

I am trying to align a marker sphere to certain places on a bigger Earth sphere based on the inputted latitude and longitude. The following is my code for this conversion, this code is based on the ...
SidS's user avatar
  • 171
0 votes
2 answers
967 views

I want to form a Sphere given radius from blocks given size. And can't figure out the code / algorithm. Any help appreciated. Edit: I dont wan't the Sphere to be filled, just the outer shell Edit: ...
Janis Taranda's user avatar
1 vote
1 answer
280 views

I have a sphere with tiles. I need to check if a tile is visible or not. See the image. Tiles are red squares, "screen" is represented by yellow quad. Currently, I calculate coordinates of ...
Martin Perry's user avatar
  • 1,126
0 votes
2 answers
161 views

I have this CameraController script attached to my camera, to follow a sphere that moves using WSAD. ...
Mr T's user avatar
  • 1
0 votes
1 answer
135 views

Projectile Not Correctly Inheriting Parent Velocity (Unity3D) So I am trying to incorporate the above person's changes into a script I am making although I'm no great coder and I'm not even sure ...
Nate's user avatar
  • 1
0 votes
1 answer
225 views

I want to be able to do this, but not go outside of the 4.4 meter limit, the radius is 4.4 meters, and it has zero gravity and no friction. I have a hard time explaining this, but imagine holding a ...
Maxabillion12's user avatar
0 votes
1 answer
872 views

I have a bunch of voxels, lets just say 64x64x64, that I use to create a sphere/planet. This works very well, but once I try to apply noise to create a more interesting terrain things go wrong. 3D ...
guest's user avatar
  • 3
1 vote
0 answers
534 views

I'm solving simple 3D sphere collisions by checking the sphere for overlap with a mesh, finding the nearest point on that mesh's surface to the center of the sphere, and then resolving the collision ...
IanLarson's user avatar
  • 811
2 votes
1 answer
511 views

I'm trying to learn some lwjgl and opengl, and I was trying to make a 3d sphere etc, I found a code to do that, but I don't 100% understand the code and the math behind it and would like to get some ...
msacco's user avatar
  • 21
3 votes
2 answers
3k views

I have a sphere with values center,radius and I need to convert the sphere to a bounding box with values min,max. How do I ...
user avatar
3 votes
2 answers
3k views

I have a polygon which is defined by a set of vertices and I need the smallest sphere encompassing the mesh. The spheres are defined by a position vector (x,y,z) and a radius. Is there an algorithm ...
user avatar
0 votes
1 answer
746 views

Is there a way to get the normal and depth of two spheres that have collided. I know that it is something to do with the center and radius of two spheres but I am not sure what
user avatar
2 votes
1 answer
763 views

I'm trying to make a world map in Unity that contains a rotating globe with landing sites on the perimeter. What I want is that when a player clicks on the landing site the globe rotates so that the ...
Greg Petersen's user avatar
0 votes
1 answer
201 views

Here is a little background on how my game objects are set up, and how the rotations and firing bullets work. I am working on this game in Unity. I have two game objects that orbit a sphere (for ...
DRiFTy's user avatar
  • 586
0 votes
1 answer
381 views

I have a game I'm working on in Unity where there are two objects on a sphere at random locations (and random rotations). I want one of the objects to always rotate so that if it were to fire a bullet ...
DRiFTy's user avatar
  • 586
1 vote
1 answer
372 views

I have two objects rotating around a sphere. One is controlled by the user (object A), another is simulating a user but controlled by the computer (object B). At random intervals of time I'd like ...
DRiFTy's user avatar
  • 586
2 votes
2 answers
569 views

I'm trying to figure out how to move an object from one Cartesian point to another located on the surface of a 3D sphere. So that the object will follow the spherical coordinate system (Theta and Phi) ...
J. Dove's user avatar
  • 105
0 votes
1 answer
262 views

I'm trying to control a 3D object (just a box for the moment) moving over a spherical 3D planet, I'm using a Ray to find the triangle in the sphere under the object. I'm calculating the surface normal ...
J. Dove's user avatar
  • 105
1 vote
1 answer
10k views

I am trying to implement a class Sphere in C++. Therefore I want to calculate the vertices in the constructor of the class (or in a seperate function..). Although ...
linux_lover's user avatar
5 votes
1 answer
2k views

I like to generate some planets like Kerbal Space Program does. By some videos of the developers I know that they use a quadsphere, which consists of six “entities” as a minimum. These are all plane ...
GR00G0's user avatar
  • 131
1 vote
1 answer
1k views

I am working on a game where you look at a sphere and get the latitude and longitude of the position. I get the position on the globe with a raycast along the direction the user is looking. Using ...
Dtb49's user avatar
  • 243
-2 votes
2 answers
1k views

I have: an infinitely thin sphere shell with center O1 and radius R1, and a solid ball with center ...
Mag's user avatar
  • 11