A geometric primitive in which all points have the same distance to a midpoint.
0
votes
0answers
58 views
How to draw grids on a sphere?
What is the common method for drawing grids on a sphere in DirectX, as it was done in a map of the globe. The following problems are concerned.
How to draw grid lines?
Grid lines, the longitudinal ...
0
votes
1answer
58 views
Converting back and forth between spherical and cartesian coordinates in glsl
I have checked all the possible resources and I still don't know why my code is not working.
This code should convert uv (texture coordinates) or cartesian into spherical and back. But my code still ...
0
votes
0answers
19 views
OpenGL C++ - Only one object appearing in scene, Parent/Child positioning problem
I have a raytracer which I'm trying to build a SphereFlake in, but I'm having trouble with the objects in the scene. When I create a sphere it creates perfectly, but when I try to create another ...
0
votes
1answer
51 views
Ball bounce in 3d
I cannot get my bounce equations right. I have 2 spheres, that can colide at any angle. One is forever stationary, other one is moving though the space.
I have X,Y,Z speed of the moving ball and a ...
0
votes
1answer
131 views
3D sphere generation
I have found a 3D sphere in a closed-source game engine that I really like the look of and would like to have something similar in my own 3D engine.
This is how the sphere looks like when it is ...
1
vote
0answers
37 views
Convert box to matrix
I have a box (non-rectangular cuboid?) and would like to convert it to a matrix such that when a point inside the box is multiplied by the matrix, a vector is returned that describes the relative ...
0
votes
1answer
329 views
How can I create a “wireframe” texture for a sphere in SceneKit?
I've been struggling to figure this out. I would like to have a sphere in SceneKit that looks like this:
I think the easiest way would be to create a mostly transparent texture with the wireframe ...
3
votes
1answer
99 views
Unity API - Making a Sphere Jump?
I'm making a very simple game with a sphere that's supposed to roll and bounce on "planets". Also, please be ready to read a lot. I want to be very descriptive for you. :)
I've pretty-much-done ...
10
votes
1answer
282 views
Draw the middle half of a sphere programmatically
I'm trying to create the middle half of a sphere. Basically to create a sphere, stack numbers and slice numbers are given, and there are two variables phi (for slices) and theta (for stacks) ...
0
votes
0answers
44 views
sphere to sphere interpolation
I am at the moment trying to come up with an scheme that interpolats between a current state and a desired state.
Each state consist of an 3d coordinate and a rotation matrix, orienting an camera ...
0
votes
0answers
85 views
3D Voxel Chunks On Round Planets
So I have recently started a 3D voxel game in LWJGL that will focus on procedricly generated planets around a solar system. I currently have blocks and chunks where a chunk contains 32x32x32 blocks ...
1
vote
2answers
121 views
Unity3D - Determining if a spherical object is grounded using raycast
I'm making a game revolving around moving a ball around a space. My game has a jump mechanic, so I need to know when I'm grounded in order to determine when I'm able to jump. Best way to check this is ...
2
votes
1answer
30 views
Returning a List of coords for a sphere in order of inside to outside
I'm looking for any algorithm that can return a list of Vector3 coordinates that form a sphere. If you read the list from the beginning it would appear the sphere was expanding.
The only algorithms ...
5
votes
0answers
358 views
How do i find the circumsphere of a tetrahedron?
I'm looking for the most minimized equation to find the center coordinates and the radius of a tetrahedron circumsphere given four 3D points.
What I found on the internet mainly deal with the circum ...
0
votes
0answers
58 views
Ball movement simulation
I'm doing a little demo with scene kit and i want to simulate the rotation of a ball on a table. How can i achieve this?
This is the scene that i prepared:
11
votes
4answers
2k views
How to load a spherical planet and its regions?
I'm designing a game partially composed of planets exploration. I want to use pseudo-random generation for them, regenerating from a defined seed when I have to load them rather than store every ...
7
votes
1answer
129 views
How can I keep the clicked point under the mouse when rotating? (GLM)
I have a spherical mesh of radius 1, centered at (0,0,0) in world coordinates. I want to rotate the sphere so that the clicked point remains under the mouse at all times. However, I cannot find an ...
-2
votes
1answer
149 views
how to rotate a sphere around centre (x y z) [duplicate]
I have centre of sphere at x y z. now I want to rotate any point (a b c) on the sphere about centre. how can I do it in c++.
1
vote
0answers
1k views
How to fix artifacts when using equirectangular 360 panorama photo on sphere
I have a equirectangular 360 panorama photo. I tried to use it as a texture for a default Unity Sphere. The image had artifacts/visible seams, especially near the "poles" of the sphere (north pole and ...
1
vote
2answers
1k views
How do I wrap an image around a sphere?
Ideally I'd like a reference of the math involved, so I can start breaking down the problem.
The simplest thing I can deduce about this problem is that the part of the sphere that the user is ...
0
votes
0answers
539 views
How to slow down a Sphere smoothly in a world controlled by force and stop it (Unity 5)?
I am a beginner and I started to use Unity 5. I play with tutorials on the site and documentation. I was basically testing springs, physics materials etc.
I have a problem understanding probably a ...
2
votes
0answers
93 views
Zoom to Mouse on a Globe using a Perspective Projection
I am trying to create a strategy game that takes place on a globe (i.e. a textured sphere). I would like to be able to zoom to mouse like on google maps. My camera always points towards the center of ...
-1
votes
1answer
616 views
Marching Cubes Chunks
I'm doing some voxel based game, where I want to have voxel planets. I decided to use the marching cubes algorithm, and I successfully created a planet (even with noise) with the following density ...
3
votes
1answer
1k views
Voxel (Marching Cubes) Terrain Creation / Terrain Editing
im working on a voxel based game in unity. the terrain(sphere-->planet) should be out of voxels and at first i built a minecraft like voxel plugin for unity. this means that i had a sphere out of ...
2
votes
1answer
199 views
Get quaternion between two objects on sphere
In a planetary gravity environment objects are represented in the following way:
struct object {
struct quaternion quat; // quaternion to represent the rotation between the object and the center ...
4
votes
4answers
1k views
How do I resolve a sphere-triangle collision in a given direction?
I am trying my hand at game physics.
I understand that the basic way to pull back a sphere when it collided is to negate the penetration distance:
// If collided...
// `distance`: distance form ...
0
votes
0answers
519 views
OpenGL - using gluSphere
I have an OpenGL code that currently draws several spheres at different locations. I generate the vertex buffer data (and normal data) myself. However, to simplify the code and increase efficiency, I ...
4
votes
1answer
3k views
Sphere-Sphere intersection and Circle-Sphere intersection
I have code for circle-circle intersection. But I need to expand it to 3-D.
How do I calculate:
Radius and center of the intersection circle of two spheres
Points of the intersection of a sphere and ...
2
votes
1answer
1k views
How to project spherical coordinates to canvas
I have objects with coordinates in a spherical coordinate system (altitude alt and azmiuth az). I want to project those to my canvas with a given size (128 x 128 pixels²) and resolution (about 6 px/°)....
2
votes
2answers
243 views
Sweep collision between two moving spheres?
Say I have a scenario like this:
Here I got two spheres (sphere A and B) that moves from on spot to another during a frame.
How can I predict where these two collide if they collide at all? In ...
1
vote
1answer
97 views
Camera Aligned To Sphere Surface
I am writing a planet renderer and have come across a problem that is really limiting the usability of the program. When I am on the planet (anywhere but the north pole) I cannot rotate the camera to ...
1
vote
2answers
933 views
Tangent on generated sphere
I have difficulties understanding the tangent/bitangent concept for normal mapping, or rather the calculations of them.
I draw a sphere which is generated with the code in the OpenGL redbook http://...
11
votes
5answers
21k views
How to change Gravity towards certain object in Unity?
I have two spheres in Unity. One is 1000x in size other is 1x in size. So I want the smaller sphere to be attracted to bigger sphere. So how do I do it. I know that it can be down through gravity ...
2
votes
2answers
2k views
OpenGL texture on sphere
I want to create a rolling, textured ball in OpenGL ES 1.0 for Android. With this function I can create a sphere:
public Ball(GL10 gl, float radius)
{
ByteBuffer bb = ByteBuffer.allocateDirect(...
4
votes
2answers
789 views
Calculating adjacent quads on a quad sphere
I've been experimenting with generating a quad sphere. This sphere subdivides into a quadtree structure. Eventually I'm going to be applying some simplex noise to the vertices of each face to create a ...
3
votes
3answers
2k views
Constructing a Planetoid Cube World?
This is sort of a multidisciplinary question, so I'm asking it here rather than on one of the other Stack Exchange sites.
I've been toying with the idea of making a game that's a mix between ...
6
votes
1answer
684 views
Walking on a sphere
I'm working on a game which involves walking your character on the surface of a sphere. Using the answer to Arbitrary Rotation about a Sphere, I've written my code as:
if (game.isKeyDown(37)) { // ...
1
vote
1answer
1k views
How to make minecraft like world round?
everyone!
I'm interested is there a game or at least example which shows how minecraft-like world turn to sphere?
Idea is that there is sphere which consists from cubes like in minecraft but they ...
1
vote
1answer
419 views
Wrong intersection: Bounding Sphere and Ray
I've got a huge problem with BoundingSpheres and Rays in XNA and I really don't know how to solve it.
The problem:
foreach (BoundingSphere s1 in GetCollisionHullBoundingSpheres())
if (ray....
2
votes
1answer
240 views
Texturing spherical terrain, seemingly arbitrary distortion
I'm using this algorithm to find texture coordinates on a sphere:
Wikipedia UV Coordinates
I get the famous seam due to the wrong interpolation, but I also get odd distortions on certain points on ...
18
votes
4answers
3k views
Spherical map representation
My latest game will take place on a small planetoid. I am looking for good data structure for representing cells on the surface of a sphere.
Triangles, squares, pentagons, hexagons? Which one ...