How to freeze rotation Y of an object - hololens

Anyone have any idea,
When we are manipulating object how to freeze rotation Y of an object.

you might be interested in MRTK Constraint Manager

Related

Sage: Drawing circles/horocycles in hyperbolic plane

I'm trying to visualize some horocylces in the hyperbolic plane, and I usually use Sage to do math stuff, but when I read the documentation reference for the hyperbolic geometry. I did not find a way to even draw a circle in the hyperbolic plane. I don't know if there is some package somewhere that can do this for me, or if I just need to write the code to do it. Alternatively, if anyone knows of a program that has horocycles and can act the modular group on horocycles that would also be great. Any help is appreciated.

Define a non-cartesian mesh in fipy

I am trying to simulate the elementary unit of a 2D system that have a P6mm symmetry in fipy and I would like to define a non-cartesian mesh that describes the system described below. Yet,
mesh = fipy.Grid2D(nx = 10, ny = 10, dx = 1., dy = 1.)
only returns uniform meshes. I thought of changing the FaceVariable, but it seems it only accepts Boolean variables. I could also simulate a cartesian system equivalent to this one, but there would be redondant data. Would someone have a better approach?
Alternatively, I could define my system this way. Is there any objection in doing so ?
FiPy does not provide a mesh class for what you want. UniformGrid2D could be used as the starting point for an equilateral triangular mesh (or a hexahedral mesh, if really required). StackOverflow isn't the right venue for that, though. Please open an issue if you'd like to pursue that.
Gmsh will produce structured, triangular meshes, but I'm not sure it can be forced to produce regular, equilateral triangles.

Finding 3d coordinates (xyz) of detected object. (Object detected using Haar cascade)

have been able to successfully detect an object using haar cascade classifier in python using opencv.
When the object is detected, a rectangle is shown around the object. The x and y position of this rectangle is known and so is the height and width (x,y,w,h).
The problem I have is trying the get the 3d coordinates form this rectangle (x,y,z).
I have not been able to find an resources on getting the z coordinate of the detected object.
I calibrated my camera and found the camera matrix and also the distortion coefficient but not sure next what to do next. I looked into pose estimation but do not think that will be able to get the 3D coordinates of this object.
Please any help will be sufficient. I just need to be pointed in the right direction so i can continue my project
Thank you.

Point Cloud - Principal Axes - Use of Inertia

I have got point clouds of different primitive objects (cone, plane, torus, cylinder, sphere, ellipsoid). The all vary in orientation, position and scaling. Furthermore all of them are initialized with a unique set of parameters (e.g. height, radius, etc.) so that their shape can be quiet different (some cones are tall, others are small and fat).
Now to my question:
I am trying to find the objects "principal components". Using PCA doesn't lead to good results, since rotated primitives can have their main variation in any direction (which doesn't have to be necessarily along the length of the objects).
The only chance that I see is to use somehow the symmetry of my primitives. Isn't there a method based on inertia? Maybe some way to find the main symmetry axis and two others perpendicular to it?
Can you give me some advice or point me to papers or implementations (maybe even python)?
Thanks a lot, Merlin.
PS: This is what I get if I only apply a PCA. Especially for cones this doesn't really work. Only cones that are almost identical in shape share the same orientation, but I need them all to point in one direction (e.g. up).
So you got cones and just need to rotate them all in the same direction?
If so you can fit a triangle to them and point the peak (e.g with the perpendicular bisectors of the sides) to your main axis.
You have an interesting problem. Normally used shape descriptors (VFH) that are invariant to shape but not pose (which is what you would want, really) would not be invariant to stretching in the shape.
I think to succeed at this you need to be clearer about the invariants that you are trying to maintain when a shape changes. Is it a topological invariant? If so, then here is a good starting point: https://www.google.com.tr/search?q=topologically+invariant+shape+descriptor
I decided to just stick to simple PCA since it's the only method that is totally generic and doesn't depend on prior (expert) knowledge about the data.

Rotate Text Cairo, Transformation matrix

http://www.cairographics.org/manual/cairo-Transformations.html
I have been using Cairo Vector Graphics Library for some work, and I quite understand some parts :-
What is the default value of the transformation matrix ?
When do I need the transformation matrix anyway ?
Suppose I don't want to rotate text, will I still need to set it , will it still be set ?
I know it is very nooblike, & I must investigate it on my own, but I cant quite understand it
The default transformation is the identity matrix. This matrix doesn't change values, so (x, y) stays the same when transformed by the identity matrix.
Rotating text is one reason that you might need this. If you don't rotate text, then you likely don't need the matrix. Most stuff shouldn't need a transformation.
If you need the matrix depends on which other stuff you do. For example, if you call other code and want to scale up the drawing by a factor of two, you could do this with a transformation matrix.
So the short version: If you don't know what to do with the transformation matrix, you can most likely leave it alone.

Resources