I'm trying out plotly for interactive 3D plotting, and it's great, but I found the 3D rotated plots a bit annoying, since by default the rotation is around all x, y and z axes (similarly as in e.g. Google Maps).
Is it possible to rotate only around the z-axis and just pan the camera view up and down?
So basically now the rotation is SO(3) in Lie group terms. I'd prefer at least an option to use SO(2)*R.
May 27 2015 EDIT
Plotly 3D graph interact in a new turntable mode of rotation.
We made this the default. Try it on any 3D graph.
Original answer
At the moment, Plotly 3D graphs only support one mode of rotation, as you described.
That said, adding a second "simple" mode of rotation is on our short term road map.
In the meantime, I suggest using the "back to default" and "back to last save" buttons in the modebar
if ever your graph gets lost in rotation.
Related
I am migrating from gnuplot to R plotting.
In gnuplot when a 3d is rotated the front and back of the view line up, making the appearance of 2d plot.
In plot3d() the back plane appears narrower than the front plane of the view. So , it appears like there is a distance view (tunnel vision).
R plot3d showing narrowing of view:
gnuplot showing a 3d rotated so the front and back are one:
In my plot3d() the xyz axis are all set to 30 - a cube.
The question becomes: does plot3d() have way to not have a narrowing of the perspective ?
If the answer is 'no' - OK.
If the answer is 'yes' - just point me to a link or the documentation.
I suspect you are looking for an isometric perspective; try par3d(FOV=0). From ?par3d:
‘FOV’ real. The field of view, from 0 to 179 degrees. This
controls the degree of parallax in the perspective view.
Isometric perspective corresponds to ‘FOV = 0’.
I am struggling to create a 3d disc window for the pp3 in spatatat.
the shape of the window is similar to a petri dish: a radius of 5cm and the wall is 3 cm high.
i managed to create a 3d box, but i cant figure how to do it for a circle.
is it possible to do?
does spatstat know how to analyze point pattern in a 3d circle?
thanks in advance for your help
Spatstat han only handle boxes in 3d and higher dimensions.
You mean a cylinder.
Currently spatstat only supports rectangular box regions (in 3D and higher dimensions).
I will take this as a feature request. Do you have data that you could share with us?
I am working with networks which vertices are nodes of brain areas with specific coordinates.
I need to visualize these networks in a 3D enviroments in order to improve the understanding of my results.
Up to now I have tried to plot them using rglplot of igraph library in R, but the result is not so good in truth.
Currently I am plotting them using projection on each pair of axis (XY, XZ, YZ).
Futhermore I also have tried several tools like gephi, but it seems that 3D is not really supported.
There is some tool or software for visualizing a network in a 3D space?
It turns out that in fact Gephi supports 3d display of graphs, only to see the effect you have to pan the graph in the Overview Pane by keeping you mouse's scroll wheel pressed! Also the rotation options are limited to rotating on the x-axis
See the example below for the Les Miserables graph laid out with the Force Atlas 3d algorithm
You can also set the coordinates from within the Data Laboratory with the aid of the Data laboratory helper plugin. See a screenshot below
i was wondering if anyone of u here knows how to smooth a polygon in Maya? I've tried 2 methods which i found online. One of which is 'Vertice Averaging' and the other 'Smooth' which are both under the 'Mesh' option.
Vertice Averaging caused my polygons to have 'gaps' or 'holes' between the triangles, which i do not intend for that to happen.
While Smooth causes the polygon's face to have 4 vertex instead of the original 3, which i do not want as well, as i need a polygon with triangle faces.
http://img.photobucket.com/albums/v483/dragonlancer/PolygonAveragingampSmoothing.jpg
And to whoever told me that it is a bug, i tried, but doesnt work =[
You said you wanted to maintain your tris so you could switch the smooth option 'Add Divisions' from exponential to linear.
If you're getting gaps, its because the original mesh has verts which are not welded together. Try Edit Mesh > Merge with a small tolerance value before running average or smooth.
In general you'll get more pleasant results if you smooth a quadrangular mesh instead of a trimesh - when you subdivide quads the results are very similar to NURBS curves, whereas smoothed triangles always tend to look look like old-fashioned 1990's game graphics.
I'm making a side scroller similar to Castle Crashers and right now I'm using SAT for collision detection. That works great, but I want to simulate level "depth" by allowing objects to move up and down on the screen, basically along a z-axis (like this screenshot http://favoniangamers.files.wordpress.com/2009/07/castle-crashers-ps3.jpg). This isn't an isometric game, but rather uses parallax scrolling.
I added a z component to my vector class, and I plan to cull collisions based on the 'thickness' of a shape and it's z position. I'm just not sure how calculate the positions of shapes for rendering or how to add jumping with gravity. How do I calculate the max y value (for the ground) as the z position changes? Basically it's the relationship of the z and y axis that confuses me.
I'd appreciate links to resources if anyone knows of this topic.
Thanks!
It's actually possible to make your collision detection algorithm dimensionally agnostic. Just have a collision detector that works along one dimension, use that to check each dimension, and your answer to "are these colliding or not" is the logical AND of the collision detection along each of the dimensions.
Your game should be organised to keep the interaction of game objects, and the rendering of the game to the screen completely seperate. You can think of these two sections of the program as the "model" and the "view". In the model, you have a full 3D world, with 3 axes. You can't go halvesies on this point without some level of pain. Your model must be proper 3D.
The view will read the location of all the game objects, and project them onto the screen using the camera definition. For this part you don't need a full 3D rendering engine. The correct technical term for the perspective you're talking about is "oblique", and it can be seen in many ancient chinese and japanese scroll paintings and prints- in particular look for images of "The Tale of Genji".
The on screen position of an object (including the ground surface!) goes something like this:
DEPTH_RATIO=0.5;
view_x=model_x-model_z*DEPTH_RATIO-camera_x;
view_y=model_y+model_z*DEPTH_RATIO-camera_y;
you can modify for a straight orthographic front projection:
DEPTH_RATIO=0.5;
view_x=model_x-camera_x;
view_y=model_y+model_z*DEPTH_RATIO-camera_y;
And of course don't forget to cull objects outside the volume defined by the camera.
You can also use this mechanism to handle the positioning of parallax layers for you. This is of course, a matter changing your camera to a 1-point perspective projection instead of an orthographic projection. You don't have to use this to change the rendered size of your sprites, but it will help you manage the x position of objects realistically. if you're up for a challenge, you could even mix projections- use 1 point perspective for deep backgrounds, and the orthographic stuff for the foreground.
You should separate your conceptual Y axis used by you physics calculation (collision detection etc.) and the Y axis you actually draw on the screen. That way it becomes less confusing.
Just do calculations per normal pretending there is no relationship between Y and Z axis then when you actually draw the object on the screen you simulate the Z axis using the Y axis:
screen_Y = Y + Z/some_fudge_factor;
Actually, this is how real 3d engines work. After all the world calculations are done the X, Y and Z coordinates are mapped onto screen_X and screen_Y via a function (usually a bit more complicated than the equation above, but just a bit).
For example, to implement pseudo-isormetric view in your game you can even apply Z to the screen_X axis so objects are displaced diagonally instead of vertically.