3d

Hiding objects that obscure the player in a 3D scene

I'm designing a 3D game with a camera not entirely unlike that in The Sims and I want to prevent the player character from being hidden behind objects, including walls, pillars and other objects. One easy way to handle the walls case is to have them face inwards and not have an other side, but that won't cover the other cases at all. W...

Uniform random (Monte-Carlo) distribution on unit sphere.

Hi! I need a clarification with algorithm generating random values for my pet ray-tracer. I emit rays from one point. And I have the problem with distribution of these rays: I need the distribution to be uniform, but it isn't... The problem I face now is that the distribution being uniform initially is not uniform after my distortions...

Silverlight - Perspective 3D

Hello, I am considering using Silverlight for a project I am working on. This project will need to show a 3-Dimensional cube. Is this possible in Silverlight? I see a lot of examples that a basically 2-sides of one item. Kind of like a sheet of paper. Is this what "perspective" 3D is? How is perspective 3D different than normal 3D? T...

Find 2 points on a 3d object and get their distance

Hey, Ok. So I guess thing would to be envision new york city and beijing highlighted on google earth... I'm trying to figure out how to map points onto a 3d primitive object (a sphere), get their distance via any direction by the circumference, and their distance by diameter. The points are going to be latitude and longitude coordinat...

How can I draw a cylinder that connects two points in OpenGL

i have two point each point has its own X and Y value and they have the same Z value. i want a function to draw Cylinder between these two points. ...

how (in maya) can i get the 3D position of the mouse?

hello... i have created a dragger context in maya using the following code, pos holds my 2D coordinates of mouse cursor, i want to convert it into 3D coordinate to be the source of the ray i want to launch,, i want it either through python scripting or through the python api,, import maya.cmds as mc mc.draggerContext( 'testContext', ...

How can I implement a "Look At" behavior in 3D space

I am trying to implement a "Look At" behavior for planes moving around a sphere so they always face the camera. What I figured out so far, I know the normal that the plane should have and I know that its rotation around its local Z axis should always be 0. I thought it was a pretty trivial operation to figure out the missing rotation va...

mapping planes onto primitives

I've looped through the vertices and mapped a plane to each one. I'm having problems orientating the planes correctly. I can get it working with a sphere but when i make any alterations to the the primitive - positions are correct but they don't face/tilt the right way. EDIT: Note - the alternation to the sphere was done before the sphe...

7 Point computational stencil cache access problem in C (or..map a 3D array into a 1D array)

Hi all, I have a problem I am trying to tackle that involves a 7 point computational stencil. For those who may not know, this would be a 3D grid, and the 7 points are the n'th point, and the neighbors one point away in the x, y and z directions, both positive and negative (or neighbors to the east/west/north/south and up/down). So thes...

Optimum ordering for packed vertex arrays on iPhone

Is there an optimum packing format for vertex arrays on the iPhone hardware? My textured (triangle) arrays are ordered: Vertex (x, y, z) Vertex Normal (x, y, z) Texture Coordinates (u, v) This is the way I've always done it. Should the UVs come before the normals? I'm not sure if it matters. I'd assume that the texturing & lighting u...

Combining 3D/2D plots

I'm trying to make a visualization that looks like this . The idea is to have a 3D surface plot overlapping a 2d representation of a surface. I can build arbitrary surfaces/polygon shapes (as in http://addictedtor.free.fr/graphiques/graphcode.php?graph=135 ) and I can make the respective 2D plot. What I don't seem to be able to figure ...

Get Point3D relative to Mesh in WPF

I have a pretty simple 3D scene that is roughly built up like this: <Viewport3D> <ModelVisual3D> <ModelVisual3D.Content> <Model3DGroup x:Name="Group1"> <GeometryModel3D x:Name="m1">...</GeometryModel3D> </Model3DGroup> <Model3DGroup x:Name="Group2"> <GeometryModel3D x:Name="m2">...</Geom...

Plotting a 3d surface plot with contour map overlay, using R

I have a 3-tuple data set (X,Y,Z points) that I want to plot using R. As the title of my question states, I want to create a surface plot from the data, and superimpose a contour map on the surface plot, so as to create the impression of the contour map being the "shadow" or projection from the surface plot. The contour map is to appear...

how to do 3D rotation around center in AS3 using matrix3D?

I am trying to rotate a Sprite in three dimensions around its centerpoint, and I am struggling to understand some of the behavior of matrix3D. Ive overridden the set rotationX, rotationY, and rotationZ methods of the Sprite as follows: override public function set rotationX (_rotationX:Number) : void { this.transform.matrix3D.pr...

How does "3D Meninas" work (CSS/Animation) ?

Hi all, Today i found this site, "3D Meninas", with a nice effect of 3D animation. When I look at the HTML code, it seems that there is no <script> or event, so I guess it only works with CSS. I'm not a CSS guru, can someone tell me how it works ? Thanks ...

Eyeball rotation

Hello, I'm developing a interactive eye follower. I want to rotate 2 spheres according to mouse movement. These spheres are representing the eyeballs.What is the best way to do this? I need to find the vector which points to the direction of the mouse current position, but i don't know how to find the rotation matrix for ball rotation. ...

CSharp - 2D windows form controls in a 3D space

Hi, please forgive me if this is not the proper place to post this question. I'm new to dotNET and know nothing about Direct3D and WPF. The tutorials I found out there don't seem to be suitable for a beginner like me. I want to create a simple windows form in CSharp which has its 2D controls placed in a 3D space, please guide me in a s...

Collision Detection between Accelerating Spheres

I am writing a physics engine/simulator which incorporates 3D space flight, planetary/stellar gravitation, ship thrust and relativistic effects. So far, it is going very well, however, one thing that I need help with is the math of the collision detection algorithim. The iterative simulation of movement that I am using is basically as ...

Simulation and synthetic video generation for evaluation of computer vision algorithms

I am looking for an easy way to generate synthetic videos to test computer vision software. Currently I am only aware of one tool that targets this need: ObjectVideo Virtual Video (OVVV). It is a HalfLife 2 mod that allows to simulate cameras in a virtual world. But I am looking for a more open (like in open source) and maybe portable...

Seamless Transitions of Scale over large distances (3D rendering)

What is the best mechanism for handling large scale structures and scenes? Examples being a continent with scale cities and geography, or infinity universe style planetary transitions. ...