FAQ Database Discussion Community


Java 3D Graphics using Applet and in built libraries only

java,graphics,3d,applet
I want to do Java 3D Graphics without using external libraries to develop a game applet. Sorry I am not that experienced with Graphics and so I am not sure how hard it would be to do it by myself

What's the use of lightmap?

graphics,unity3d,3d,game-engine
For starter, I know what a lightmap is, what to be gained by using it, and how to implement it. What I don't get is, if you have dynamically moving objects, which won't be able to generate a lightmap, you still need a light source to project their shadows. So,...

Convert world to normalized viewport

3d,vtk
Is there a way to convert a world point into normalized viewport position ? How can I do that ? I saw how to convert world position to viewport, but not normalized viewport ... can you help me ? Thank you.

OpenGL cube not being rendered

c++,opengl,3d
I'm struggling to get a cube to render in opengl. When I pass in the MVP already calculated to the vertex shader it works fine, but when I pass in the model, view and projection then do the calculation in the vertex shader it doesn't show the cube. I'm also...

how to create a 3D height map in python

python,matplotlib,plot,3d,surface
I have a 2D array Z that stores the height at that element's position. Other than using the method here in which I need to create array X and Y with the same size as Z, are there any simpler methods to create a 3D height map? The 3D surface...

How to switch Three/js camera controls from First Person to Orbit and back

javascript,3d,three.js
You can switch from Three.js Orbit Controls to FirstPerson controls without a problem. But when you go from First Person to Orbit the display gets stuck in a 'mousedown' mode. What do you need to do to go back and forth between First Person and Orbit controls seamlessly? The jsBin...

Java 3d parametric surfaces drawing

java,3d,computational-geometry
i really need your help since that i am fighting with the unknown for some time now. I am trying to draw a parametric surface on java 3d. The surface is being drawn if i a use a point array. Here is the code : PointArray lsa=new PointArray(length, GeometryArray.COLOR_3|GeometryArray.NORMALS|GeometryArray.COORDINATES); float...

Placing the camera position inside cube in openGl

opengl,graphics,3d
I am trying to create a 3D room. What I am doing is that I am creating a 3D cube and then trying to changing the camera position inside the cube so that it appears as a room. When I make my coordinate vertices as 3 instead of 1 it...

3D ball map rotating in HTML5 canvas

javascript,html5,canvas,3d,rotation
I have created a multiplayer pool game in HTML5 canvas and it is working just fine. I would like to enhance it with real ball rotations. Now I'm using simple png files for balls which cannot "rotate" in any direction (they can but it is not real). Is there any...

How to create a wiresphere using lwjgl?

graphics,3d,lwjgl
I'm trying to find a way to draw a wire sphere using LWJGL. I have seen that using GLUT I could use the function glutWireSphere(double, int, int), but what about LWJGL? is there any way to do that similarly? I was looking for that but I haven't found anything yet....

Best way to drag 3D point in 3D space with mouse picking in OpenGL?

c++,opengl,3d,drag-and-drop,mouse-picking
What is the best way to drag 3D point with mouse picking. Issue is not the picking but to dragging in 3D space. There are two ways I am thinking, one is to get the View to World coordinates using gluUnProject and translate the 3D point. The problem in this...

How to draw 3D Coordinate Axes with OpenCV for face pose estimation?

opencv,image-processing,3d,computer-vision,camera-calibration
Suppose I have got the face euler angles (pitch, yaw, roll) now. How can draw the 3D Coordinate Axes which show the face pose. Here is an exmaple from here: ...

Pygame 3D: How to and is it possible?

python,performance,dictionary,3d,pygame
So I want to program a 3d-mesh viewer in pygame, no other 3rd-party modules wanted (panda3d is perfect, but it's very complicated). My idea is: list_of_surfs = {'85 50':'70deg'} #the 85 50 and the dimensions of the #side/surf, and 70 deg of rotation to be able to see it, then...

How are textures mapped to 3D objects?

c++,opengl,3d,textures,texture-mapping
I'm currently learning C++ and OpenGL and was wondering how the below code is able to map a texture to a 3D object within a scene. The code currently works, but I'm struggling to understand it. //In the Pixel Shader. float pi = 3.14159265359; vec3 N = normalize (Normal); vec3...

Unity WebPlayer “Failed to initialize player's 3D settings”?

web,unity3d,3d,augmented-reality,unity-web-player
I am trying to execute one of Daqri's AR demos, but I keep getting "Failed to initialize player's 3D settings" ...error every time I try to run the demo (Which is essentially a webpage). I am using unity 5.0.0f4 and even 4.5.3f3 (As a tried to implement a fix that...

Rotate a 3D object on 3 axis in JavaFX properly

java,javafx,3d,quaternions,javafx-3d
So the method that I've used so far to rotate objects in JavaFX was that I layered it in 3 groups, each of them with a Rotate attached and locked to a single axis like so: Rotate heading, roll, pitch; Group normalrotate, rollrotate, verticalrotate; heading.setAxis(new Point3D(0,1,0)); normalrotate.getTransforms().add(heading); roll.setAxis(new Point3D(0,0,1)); rollrotate.getTransforms().add(roll);...

How do I make an object perpendicular to a face with Three.js?

javascript,3d,three.js
Relevant codepen: http://codepen.io/OpherV/pen/yNebep In my game I have a model of an alien tree. For each face of this tree I generate a pyramid (CylinderGeometry with 4 faces), and position it at the center of the face. Then I wish for this pyramid to be perpendicular to the face, so...

plotting points in 3d surface using x,y,z coordinates

3d,gnuplot
I need to plot some points in 3d surface based on x,y,z coordiantes values in a file named as test.dat test.dat file contains At-No X Y Z 6 3.532210 -2.171743 0.921140 7 1.164869 -1.418981 0.782133 1 2.454732 2.332989 -0.907213 6 -3.246376 -1.047325 -0.602590 6 -2.620684 0.053348 -0.013310 6 -4.569969 -1.249720...

compile .C file Include library using mex - error LNK2019: unresolved external symbol - for NPTrackingTools

c,matlab,visual-c++,3d,mex
Hello I'm trying to build simple C function with external commands provide by library NPTrackingTools API #include <stdio.h> #include "mex.h" #include "NPTrackingTools.h" void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { int ret1,ret2,ret3; ret1=TT_Initialize(); ret2=TT_FinalCleanup(); ret3=TT_Shutdown(); printf("Hello, World! \n"); return 0; } I tried the following compiler code...

3D plane/map: model versus native code?

opengl,3d,directx,gaming,3d-modelling
I'm curious as to how games are written. For those who have a better understanding of how the latest-title, real-world games are written... Are 3d planes(?)/maps/grounds of a level created in 3D programs then just imported & loaded into the code IDE, or are they ever generated completely via the...

creating a 3d array in python does not create array correctly

python,arrays,3d
I wish to make a 3d array by appending each element to the array in a loop, but instead of getting a 3d array I just get a 1d array with more elements in it. I'm working in Python 2.7 I want to get labels = [1,34,u'te],[2,44,u've],[4,43,u'ht] My code so...

DirectX 9 not rendering after adding transforms

c++,3d,directx,direct3d,directx-9
so far I got a cube rendered without any transforms (thus it was rendered in an orthographic perspective), and I am working on the previous code to get it into a perspective view, with all the matrices involved. I changed the Flexible Vertex Format so as not to have RHW...

Using “expression” in R rgl axis labels

r,graphics,3d,rgl
Do the rgl routines accept the use of "expression" for Greek letters and super/sub script for axis labelling? Something like xlab=(expression(paste("Lyman ",alpha,))) works perfectly well in a normal plot call but just seems to display "(paste("Lyman ",alpha,)" as my axis label in plot3d and decorate3d. If not, how can I...

Converting 2D images to 3D

python,r,3d
I was trying to convert 2D images to 3D by rotating them about the axes (like a circle to a sphere). Currently my problem is that suppose I have two functions f(x) and g(x) both in one variable. I wish to make a plot of the functions and use rotation...

3D point drawing in Android using OpenGL ES

android,opengl-es,3d
I am new to Android and OpenGL both. I want to draw a series of 3D given points in android with open GL where last point should blink. I have drawn square, pyramid and triangle but still not able to draw above-mentioned thing. Easy method will be appreciated.

Plotting a 3D Cylindrical Surface plot in Python

python,matplotlib,plot,3d,surface
I am trying to create a cylindrical 3D surface plot using Python, where my independent variables are z and theta, and the dependent variable is radius (i.e., radius is a function of vertical position and azimuth angle). So far, I have only been able to find ways to create a...

How to draw and save 3D model in Qt from an array of 3d points?

c++,qt,opengl,3d,drawing
In my program I have an array of points with X; Y; Z coordinates. I need to be able to draw 3d model according to coordinates from this points and save it in file. And I'm stuck. Task seems to be not that difficult, it looks like I just need...

How to check a point is inside an ellipsoid with orientation?

algorithm,3d,geometry,distance,computational-geometry
For an ellipsoid of the form with orientation vector and centre at point , how to find whether a point is inside the ellipsoid or not? An additional note that the geometry actually is with a=b (spheroid) and therefore one axis is sufficient to define orientation Note: I see a...

Gnuplot 3D - plot scatter points and a surface *and* lines between the them

plot,3d,gnuplot,surface,scatter3d
I've been unable to find a way of producing the plot described in the title, does anyone know how to do this if it's possible? I'd like to plot a surface from a function, and plot points from a file, and have lines drawn between the points and the surface....

Make Camera LookDirection look front face

c#,wpf,3d,camera
How to look at the front of 3D Model in WPF? I am confused to set X Y Z for LookDirection. I don't know what happens when I set xyz and I don't know where camera is looking at. I don't know the same thing for UpDirection. Below is my...

Export JavaFX model to STL file

javafx,3d,java-3d,javafx-3d
I would like to generate some shapes in JavaFX and export it to STL format for 3D printing. Is there a library out there to help with the export?

3D Lines disappear sometimes

javascript,d3.js,3d,three.js
I am building 3d line chart from data here is the code Demo the part of code that generate line is parentTransform = new THREE.Object3D(); var _color = d3.scale.category10(); for (var i = 5; i > 0; i--) { var material = new THREE.LineBasicMaterial({ // color: 0x0000ff,linewidth: 30 color: _color(i),...

Is there any easy way to rotate an image about z axis using java without jumping into java 3d?

java,3d,image-rotation
I want to rotate an image about the z axis using java. I tried to search for ways to do that but it involves complex matrix manipulations and it works on 3d models and stuff. I will resort to that if there is no other way but would like to...

WhirlyGlobe Sample for android not working

android,opengl-es,3d
I have tried whirlyglobe sample code but it didn't work, can you check and make it working for android. " MapGlobeTestFragment " this one "fragment class" is missing for android sample and its not present in library.

Three dimensional plot on matlab

matlab,3d
I am trying to do a figure similar to the one attached. I have exactly a (224x1) vector with dates (x-axis), a (10x1) vector with maturities (y-axis) and a (224x10) matrix with the values (z-axis). I tried surf(X, Y, Z) but I got an error ("data dimensions must agree"). How...

OGRE EXCEPTION(7:InternalErrorException): Error decoding image in FreeImageCodec::decode at

c++,opengl,3d,textures,ogre
I'm using Ogre 3D 1.9, and I'm trying to load a mesh contained in a folder pointed by the resource.cfg file. The folder contains sub-folders, that separate the .mesh files, .material files and textures. Here's the content of the resource.cfg file: # Resources required by the sample browser and most...

Shadow Map Positioning and Resolution

c++,opengl,3d,shadow,shadow-mapping
I'm currently learning C++ and OpenGL and was wondering if anyone could walk me through what is exactly happening with the below code. It currently calculates the positioning and resolution of a shadow map within a 3D environment. The code currently works, just looking to get a grasp on things....

Transforming surface normal vectors and tangent vectors

opengl,math,3d
According to a book Physically Based Rendering: From Theory to Implementation. By Matt Pharr, Greg Humphreys (link, p. 86-87), surface tangent vectors are transformed as common vectors, using transformation matrix M, but surface normal vectors are transformed using . I wonder why scaling does make a normal incorrect, but doesn't...

MATLAB: How to make camera light follow 3D Rotation

matlab,user-interface,3d,rotation,lighting
I have come into a problem recently when trying to rotate 3D objects. I am building a GUI and I have a separate figure where an object is plotted. In the figure, I allow the user to use MATLAB's built-in rotate button to move the object around. However, I am...

opengl: rotating an ellipse

c++,opengl,3d
I am having trouble rotating an ellipse in OpenGL. So, I have some code to draw an ellipse as follows: glPushAttrib(GL_CURRENT_BIT); glColor3f(1.0f, 0.0f, 0.0f); glLineWidth(2.0); glPushMatrix(); glTranslatef(0, 0, 0); // ellipse centre glBegin(GL_LINE_LOOP); float inc = (float) M_PI / 500.0; for (GLfloat i = 0; i < M_PI * 2;...

How to apply flat shading to RGB colors?

graphics,colors,3d,rgb
I am creating a small 3d rendering application. I decided to use simple flat shading for my triangles - just calculate the cosine of angle between face normal and light source and scale light intensity by it. But I'm not sure about how exactly should I apply that shading coefficient...

Why translating matrix on Z axis is not the same as changing position on the Z axis by same number?

math,matrix,3d,three.js
I have a mesh that has origin point at the bottom. I want to move it by -132 on Z axis. If I change the position of the Mesh it is on the correct position. But If I translate it on the Z axis by -132, the mesh is off...

How to setup camera to point at object

ios,3d,scenekit
In my app I load models from different files (format is the same) and they have different geometry: big, small, wide, etc. I have object and camera position hard coded and for some cases I don't see anything because camera not point to object. Maybe there is a way to...

How to calculate the distance from all points in a 3d matrix to a plane in matlab?

matlab,matrix,3d
This question is from my last post, But I will just focus on a particular part, If I have a 3d matrix M, 256*256*124,and a plane defined by 3 points that intersect the 3d matrix, A,B,C, how to find the distance of all points in M to the plane defined...

Finding 3D coordinate of object

opencv,image-processing,3d,camera-calibration
I try to find 3D coordinate (in world )of abject that I know his coordinate in image .so after some research in internet I succed to find X and Y cordinate. but I can't find Z that is my program in openCV void drawAndCalcul3D(int x,int y,Mat& frame) { cv::Mat uvPoint...

Mesh data structure used in popular 3D software [closed]

3d,mesh,3d-modelling
Anyone knows what kind of mesh representation data structures (half-edge, quad-edge, winged-edge etc) popular software like Lightwave 3D, Maya, Softimage, 3D studio and others use?

Safe frame calculation

3d,3dsmax
How safe frame is calculated in 3ds Max. I want to know the relationship between Viewport width and height, Render width and height(aspect ratio) in the calculation of safe frame width and height. My final goal is to find the distance between top left corner of the plane and top...

Three js custom geometry - lighting does not work

javascript,3d,three.js
I have the following code that draws a diamond in Three.js: var material = new THREE.MeshPhongMaterial({color: 0x55B663, side:THREE.DoubleSide}); var geometry = new THREE.Geometry(); geometry.vertices.push(new THREE.Vector3(0, 1, 0)); geometry.vertices.push(new THREE.Vector3(0, -1, 0)); geometry.vertices.push(new THREE.Vector3(-1, 0, -1)); geometry.vertices.push(new THREE.Vector3(1, 0, -1)); geometry.vertices.push(new THREE.Vector3(1, 0, 1)); geometry.vertices.push(new THREE.Vector3(-1, 0, 1)); geometry.faces.push(new THREE.Face3(0, 4,...

Drawing in JS not working

javascript,html,3d
I'm making a 3d game in java script and this image is not drawing. No errors come up in the console ether. It tells me it drew but I dont see anything. Its not a problem with the source. It tells me theres a wall there yet it does not...

How to get a cubical plot using highcharts 3D scatter chart?

javascript,highcharts,3d,scatter-plot
I'm looking for a tool to display 3D scatter plots using JavaScript and found Highcharts' 3D scatter chart which looks nice. Only thing is that I want the chart to have a cubical form since all axis are from 0 to 10. Right now the X-axis is twice the size...

MATLAB - 3D surface plot

matlab,plot,3d,surface
I have 20 data points in 3D space. Here you can see them plotted: clear all close all clc Data = [97.4993 104.3297 0.7500 196.7021 100.0000 105.0000 0.7500 290.9164 100.0000 107.5000 0.7500 142.1626 96.2569 106.4992 0.7500 143.3605 97.5028 104.3317 1.0000 197.1111 100.0000 105.0000 1.0000 290.4210 100.0000 107.5000 1.0000 144.0155 96.2530...

Why will my geometry not appear? (jMonkeyEngine)

java,3d,jmonkeyengine
I'm just now picking up jMonkeyEngine and I've encountered an issue I can't seem to solve. In the simpleInitApp method in the main class, I can use the following code to successfully render a box: Box playerBase = new Box(Vector3f.ZERO,1f,1f,1f); Geometry playerBaseGeom = new Geometry("playerBase", playerBase); Transform fixBaseHeight = new...

How to make 3D histogram in R

r,plot,3d,histogram
This is my goal: Plot the frequency of y according to x in the z axis. These are my problems: I have a two columns array (x and y) and need to divide x into classes (p.ex. 0.2 ou 0.5) and calculate the frequency of y for each class of...

Bid Rent Curves - Plotting Circles of Projected Radii from Another Dimension

r,plot,3d
The goal is to reproduce this Bid-Rent graph in R: The challenge is to draw the projected circles. So far I got: The 2D part is created by the R code below with the traditional graphic system in base R: #Distance X <- seq(0,7,1) #Bid Rent Curves: Commercial, Industrial, Residential...

opengl: Change the origin to upper left corner

opengl,3d,coordinate-systems
I am having trouble setting the openGL origin to the upper left corner of the view. So, in my window resize handler, I do something as; // ox and oy are some offsets and width and height are the // required viewport width and height glViewport(ox, oy, width, height); glMatrixMode(GL_PROJECTION);...

How to calculate a random point inside a cube

math,vector,3d,cube
I'm trying to figure out the math to find a random point inside a cube. I have something small but it can't take into account the rotation of the cube. Here are some images of my results. Here you can see the cube is rotated to some degree but when...

plot a line in 3D plot in julia

matplotlib,plot,3d,julia-lang
I'm trying to plot a line segment between the points [1,1] and [0,0] in the surface Z function x^2 + y^2, i've already plotted f with: using PyPlot using Distributions function f(x) return (x[1]^2 + x[2]^2) #return sin(x[1]) + cos(x[2]) end n = 100 x = linspace(-1, 1, n) y...

Plotting a imshow() image in 3d in matplotlib

python,matplotlib,3d
How to plot a imshow() image in 3d axes? I was trying with this post. In that post, the surface plot looks same as imshow() plot but actually they are not. To demonstrate, here I took different data: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np...

Cannot create volume from Image3D function in Mathematica

arrays,image-processing,multidimensional-array,3d,wolfram-mathematica
I'm getting an error when using Image3D function of mathematica. I am trying to use that function to create a 3D volume from the array imagevar, which contains 10 grayscale binary images. images = FileNames["*.png"]; count = 1; Do[imagevar[count++] = Import[image], {image, images}] Image3D[imagevar[]] Whenever I run it, it returns...

Converting 2D screen coordinates to 3D Coordinates in PyQT

qt,3d,pyqt,2d,2d-3d-conversion
I am using PyQT for one of the first times, and I'm having trouble figuring out where a mouse click is in 3D space. Obviously it is not a perfect 1-to-1 mapping, but let's say that I click on a location (x, y, 0) on my QtGui. How can I...

Is it possible to plot implicit 3d equation using sympy?

python,matplotlib,plot,3d,sympy
Is there a way to plot a 3 variable implicit equation using sympy. Going by docs it has only support for implicit 2d plots. Or are there any other options for plotting a 3d plot using python where the equation can be an input from user

Displaying surface with non-rectangular boundary

matlab,image-processing,plot,3d,surface
Refer to the attached image. I want to display the image in Matlab using the function surf(). However, I only want to display the region of the actual object without the background (the pale-green region surrounding the actual object which has 0 value). How to do that? I tried replacing...

Create a formula for velocity based on rotation in 3d?

math,3d,rotation,velocity
So I have a bit of a math problem. Here are the pieces. Input: Rot = Rotation (degrees). This is the rotation of the "player". This is also the yaw. Vel.X = This is the left/rightward movement that would be happening if it weren't rotated Vel.Z = Same as last...

Creating A Cube Using Only CSS Gradients

html,css,graphics,3d,cube
I've tried numerous ways using linear-gradients to create several stripes layered on top of each other and have gotten very close but seem to be stuck on the top face. I'm trying to accomplish this using gradients be it linear or radial so that I can eventually upgrade them to...

Unity detecting GameObjects behind Camera

math,unity3d,3d,camera
I have a map gameobject, that has 8x8 childs, set up in rows and columns. The hero can go circular on the edges, ie from [0,0] to [8,0]. That part works good, but you can't see where are you going on the edge, so I've set up a script, that...

I need to plot some 2d data through time (thus 3d)

r,plot,3d
I have an xts object of data through time: > head(vixData[,2:8], 5) F1 F2 F3 F4 F5 F6 F7 2009-06-08 30.25 32.00 31.70 31.75 31.65 30.85 29.95 2009-06-09 29.10 30.95 30.95 31.15 31.10 30.40 29.45 2009-06-10 29.10 31.20 31.30 31.45 31.50 30.75 29.95 2009-06-11 28.10 30.60 30.75 30.90 31.00 30.20...

Convert 3D models to patent digrams [closed]

3d,3dsmax,3ds
I want to convert 3dsmax file to patent diagrams in different perspectives. I am new to 3dsmax, and i want to know if there is any method to export it to line drawings like the ones that is available in patents

Why osgviewer works while osgDB::readImageFile() fails?

3d,openscenegraph
I'm new to OpenSceneGraph, and now I met a problem. When trying out a simple skybox program, it gives Warning: Could not find plugin to read objects from file "xxx.jpg" when calling osgDB::readImageFile(), and I can only see a white screen; Then I tried using osgviewer --image xxx.jpg in cmd,...

continous 3d plotting using matplotlib

python,matplotlib,plot,3d
i am working on a project that require a continuous 3D plotting using matplotlib. the whole project is complex, but i summarized the problem with this simple example: import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import time count=0 fig = plt.figure() ax = fig.gca(projection='3d') z...

JavaFX 8 Transform to pitch, yaw and roll rotation angles

matrix,3d,rotation,javafx-8
Implementing the answer from this thread I have this code that translates the deltayaw, deltaroll and deltapitch angles into one angle and rotates a node around it. The angles that are taken as the parameters are momentary changes of angles since giving the whole angles would ignore the changes in...

Best program to create Java games? [closed]

java,3d,ide,programming-languages,2d-games
Not much to it Java Windows 8.1 32 bit Still beginner 2D Thanks...

What does 0 0 1 mean in coordinate systems for 3d object?

math,matrix,3d,three.js
I was reading and learning about coordinate systems in 3d and found that some people are using different explanations about rotation of coordinate system. What does it mean for 3d object to be drawn in coordinate system: 0 0 1 1 0 0 0 1 0 ...

How do I plot a projection of 3D scatter data on the XY/XZ/YZ planes?

python,matplotlib,plot,3d
I have 4D data (3D scatter points + color) plotted using matplotlib's mplot3d library. To aid in parsing how the cloud of points is distributed in space, I'd like to show a projection of the cloud across each of the 3 planes (XY, XZ, YZ) using a 2D histogram/contour plot....

Passing a pointer to a 3D array with a defined size

c,arrays,pointers,3d
I am creating a simple game in which I have a board which I am passing to many functions to change its values. Right now I am doing it like that: void play(int board[2][HEIGHT][WIDTH]); where HEIGHT and WIDTH are both defined using define. How can (should) I simplify it? I...

Basic Specular Shading

c++,graphics,3d
I am playing around with a simple code that generates a shaded sphere. I don't yet fully understand the math but I am figuring it out as I play with the code. I was wondering how one might implement specular shading into this based on this code. Any suggestions? for...

Algorithm for cutting a mesh using another mesh

graphics,3d,mesh
I am looking for an algorithm that given two meshes could clip one using another. The simplest form of this is clipping a mesh using a plane. I've already implemented that by following something similar to what is described here. What it does is basically inspecting all mesh vertices and...

Blending between an N-sided shape and a perfect circle with the same origin?

python,3d
I'm currently writing a 3D shader for a computer program, and I've run into a bit of a problem I'm hoping someone can help me with. The shader is designed to generate an N-sided shape in 2D space. The 3D program that drives the shader essentially passes you a set...

Fast Quaternion-Vector Multiplication with other Transformation Matrices

math,matrix,3d,quaternions,rotational-matrices
I am currently trying to find an equivalent for the following equation: vec_res = inverse(VM) * (q * (VM * vec_input) * conjugate(q)) where VM is a standard view matrix , q is a normalized quaternion, and vec_input a vector. In the form: vec_res = A * vec_input; or vec_res...

How to rescale the intensity range of a grayscale 3 dimension image (x,y,z) using Matlab

image,matlab,image-processing,3d
I can't find information online about the intensity rescaling of a 3D image made of several 2D images. I'm looking for the same function as imadjust which only works for 2D images. My 3D image is the combination of 2D images stacked together but I have to process the 3D...

Matlab plot3 movie where the colour of each point varies depending on arbitrary vector

matlab,plot,colors,3d,movie
I have a set of data arrays that are nx6, where the 1st 3 columns are the x, y, z coordinates of a trajectory and n varies. I have written a script in matlab that allows me to plot each point in succession and then make it into a movie,...

DirectX 9 projection matrix infinite element?

c++,graphics,3d,directx-9
I've been banging my head on doing transformations in DirectX 9 and during debugging I finally noticed a problem, when calling D3DXMatrixPerspectiveFovLH(&projection, D3DX_PI/4, yRes/xRes, 1, 100); the first element (_11) of projection is #INF, which I'm pretty sure it should not be. This is directly after declaring this matrix and...

Matrix Transformation in GLSL not working

c++,opengl,matrix,graphics,3d
So what I'm trying to do is make a transformation matrix for 2D GUI objects. When I multiply my three transformation matrices together, Rotation and Scale actually effect the rotation and scale of the object, but not Position. I checked in GDebugger, and the matrix is being properly calculated, but...

R scatterplot3d turn x axis text 45°

r,text,3d,axis,scatter-plot
I have something like this, and want to turn xlabels 45 degrees (it is going to be rather long text): a<-c(1:10) b<-c(1:10) c<-c(1:10) scatterplot3d(a,b,c, main="3-D Scatterplot",color="blue", pch=19, type="h", lty.hplot=2, box=F, scale.y=.5, lty.grid=1, lab=c(9,5,1), xlab="", ylab="", zlab="") ...

OpenGl view matrix - wrong “camera” orientation and position

opengl,3d,camera
The symptom is, that the "position of the camera" seems to be mirrored around the x axis (negative z instead of positive z) and the "orientation of the camera" is opposing to the expected. In other words, I have to rotate the camera by 180 degrees and move it forwards...

OpenGL 3.3 lighting gives really strange disortions

c++,opengl,3d,shader,lighting
I've, the last month, been following tutorials on a various pages (learnopengl.com) amongst others. I got to the lighting section (I created a loader to load meshes with Assimp first), my fragmentshader code is pretty much the same as the tutorials lighting ( learnopengl.com/basic_lighting). Frag code: #version 130 out vec4...

Unity - move 3d object in an AR scene

unity3d,3d,augmented-reality,movement,gameobject
I have an AR scene that has one AR camera, an image target and 3d object below as. I create an .cs file and attach to ARCamera. I want to move AR object to mouse click position. I tried many codes for this. But I couldn't success it. I know...

OpenGL flickering screen

c++,c,opengl,graphics,3d
I've written a simple opengl running in my ubuntu laptop. It is a small solar system including the sun and the earth, the earth rotates around the sun. The problem with my program is the screen keep blinking continuously every time I try to run it. #include <GL/glut.h> #define SUN_RADIUS...

How to check if two convex polyhedrons intersect with each other in Three.js?

javascript,3d,three.js,intersection
I'm working on a problem that need to randomly generate and put convex polyhedrons into a cube/cylinder container at randomly chosen points without overlapping. I'm using three.js to get a graphic output. A demo. While putting a polyhedron, how to check whether it intersects with other polyhedrons? The convex polyhedron...

Maya Python: Check to see if the attribute has any keyframes

python,graphics,3d,maya,maya-api
I am trying to write a python script for Maya that will copy keyframes from one rig to another. I have found objects and matched them up. What I am trying to do now is copy the keys from the original objects if the original objects have keys to be...

Is there any way to add color to Model3D in WPF?

c#,wpf,3d,textures
I am writing a program in WPF. I am using HelixToolkit to load models from file (I need to load several models from files) like this: var importer = new HelixToolkit.Wpf.ModelImporter(); Model3D triangle = importer.Load("hand.obj"); ModelVisual3D Model = new ModelVisual3D(); Model.Content = triangle; MainViewPort.Children.Add(Model); And I need the entire Model3D,...

Clarification on Marching Cubes Algorithm

c++,algorithm,3d,marching-cubes
In regards of Marching Cubes, i have some doubts regarding its algorithm and implementation. I have gone through the excellent Paul Bourke article of Marching Cubes and also the available source code on the site, yet, i still encountered some problems in term of understanding as well as how to...

finger position using leap motion

python-2.7,3d,leap-motion
i want to use Leap Motion to get my Index finger Tip position in the space ( 3D position X,Y,Z ) , how can i do that in leap motion ? this is what i do only to detect index finger, but there an error : def on_frame(self, controller): #...

JavaFX 3D TriangleMesh with transparency

javafx,3d,transparency,transparent,javafx-3d
I have a texture I want to use for a TriangleMesh (it's a simple cube). Some parts of the texture are transparent. When I put the texture on the mesh, it's black. Is there a possibility to change that? I would like to make it transparent. Appreciate your help, thanks...

How to “add” two Triangle Meshes together in javafx?

javafx,3d,javafx-8,javafx-3d
I am making a 3D model of the volume generated by two functions: one as the base (in intersection of the x-axis), and the other as the height of the volume.This is achieved by approximating the volume of small parts, drawing that mesh, then adding all of the meshes together....

LibGDX - perspective camera smooth translation & direction

java,3d,libgdx,opengl-es-2.0,perspectivecamera
I am trying to implement smooth 3D camera in my game. So, I have a few reserved positions and directions and I want to change view of my camera by applying them to my camera. Now I am doing it like below: //Reserved positions and directions //View #1 Vector3 pos1...

How does using CSS 3D Transforms affect SEO? [closed]

css,3d,seo,transform,googlebot
Google's made a big deal of "if you hide it, it won't count." However, google cache shows it doesn't understand a lot of things correctly. Maybe google sees something as hidden when it should show or shows when it should be hidden. So, I ask about CSS 3D transforms. Take...

3D Vector defined by 2 angles

math,vector,3d
So basicly I'm looking for a way to calculate the x,y and z component of a vector using 2 angles as shown: Where alpha is the 2D angle and beta is the y angle. What I've been using uptill now for 2D vectors was: x = Math.sin(alpha); z = Math.cos(alpha);...

gluUnProject gives flippped y position

opengl,3d,coordinate-systems
I have set up openGL, so that the origin is at the top left corner. However, using gluUnProject to convert mouse coordinates to OpenGL coordinates, still gives me coordinates where the origin is at the bottom left corner and I am not sure why that is. So, OpenGL is setup...

Draw a sphere on a billboard with world normal from a pointlist

3d,directx,shader,hlsl
I am drawing spheres on billboards by passing center world positions via a StructuredBuffer and use the geometry shader to build a billboard facing the camera. The sphere is drawn correctly and I can figure out the UVs. Now I would like to light it but I cannot figure how...

Why don't people use tetrahedrons for skyboxes?

opengl,graphics,3d,skybox
When rendering a sky with a fixed texture in 3D games, people often create 6 textures in a cube map first, and then render a cube around the camera. In GLSL, you can access the pixels in the textures with a normal instead of a texture coordinate, and you can...