[Solved] How to change 3d point to 2d pixel location?

If all you want to do is find 2D screen locations from 3D locations its easy if you know similar triangles. No triggers are required. just make up some variable that is about the distance in pixels out of the screen to your eyes – call that the focal_length. You can adjust that figure to … Read more

[Solved] Creating 3D software C++ [closed]

You can check out this tutorial: http://www.codeproject.com/Articles/20286/GLUI-Window-Template#_articleTop or You can look at mine I did for a school project. https://github.com/sitting-duck/stuff/tree/master/School%20-%20Comp%20Sci/Computer%20Animation%20-%20Fall%202014/Assn1%20-%20Transformations/assn1%20redo/assn1 In this version I just use key bindings to initiate the transformations. Will be easier than making a GUI, so I did that first to learn how to get the transformation code all working, when … Read more

[Solved] Loading .obj file using c++ and opengl [closed]

Actually there are many solutions if you search in Google. Here is one simple solution as below. First define one model containing face and vertex info: class obj3dmodel { struct vertex{ double x; double y; double z; }; struct face{ unsigned int v1,v2,v3; }; std::vector<vertex> vetexes; std::vector<face> faces; public: void readfile(const char* filename); void draw(); … Read more

[Solved] rotate 5 circle problem [duplicate]

You should call glutSwapBuffers only once in the drawing function. For an animation you have to call glutPostRedisplay, to ensure that the display function will be called again. The glBegin and glEnd calls only have to be called once per circle. In the for loop you just supply vertices with calls to glVertex. To simplify … Read more

[Solved] 3d image visualisation with numpy/vtk

I finally find out what was wrong here’s my new code import vtk import numpy as np import os import matplotlib.pyplot as plt import PIL import Image DEBUG =False directory=”splitted_mri/” l = [] k=0 #add the next picture in a differente level of depth/z-positions for file in os.listdir(directory): img = directory + file if DEBUG … Read more

[Solved] How to make each component of a 3D OpenGL object touchable in Android? [closed]

I think you are looking for ray picking or ray intersection. This answer has a link to a iOS sample/video which I believe is what you are after. https://gamedev.stackexchange.com/questions/12360/how-do-you-determine-which-object-surface-the-users-pointing-at-with-lwjgl/12367#12367 Another related SO question: Implementing Ray Picking That should get you started on what you need to do. 1 solved How to make each component of … Read more