How to create Draw Interactive rectangle with eyeShot - cad

I am trying to write an autocad-like software with the eyeshot library, but I have difficulty performing the rectangle drawing function, can anyone help me, please?

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.

Drawing a rotated rectangle in python 3, pygame

I am working on a simple game in Python 3 and I need to draw a rectangle rotated by a given angle and around a specific centre of rotation.
Is there a simple way of doing this?
As long as you are using the pygame library, the pygame.transform.rotate(*Surface*,*angle*) function may be worth a try.
Without a code sample it is hard to understand the context you are trying to apply this in.

Converting vertex colors to UV texture in meshlab

I am trying to write a script that converts the vertex colors of a scanned .ply model to a good UV texture map so that it can be 3D painted as well as re-sculpted in another program like Mudbox.
Right now I am unwrapping the model using smart projection in Blender, and then using Meshlab to convert the vertex colors to a texture. My approach is mostly working, and at first the texture seems to be converted with no issues, but when I try to use the smooth brush in Mudbox/Blender to smooth out some areas of the model after the texture conversion, small polygons rise to the surface that are untextured. Here is an image of the problem: https://www.dropbox.com/s/pmekzxvvi44umce/Image.png?dl=0
All of these small polygons seem to have their own UV shells separate from the rest of the mesh, they all seem to be invisible from the surface of the model before smoothing, and they are difficult or impossible to repaint in Mudbox/Blender.
I tried baking the texture in Blender as well but experienced similar problems. I'm pretty stumped so any solutions or suggestions would be greatly appreciated!
Doing some basic mesh cleanup in Meshlab (merging close vertices in particular) seems to have mostly solved the problem.

Point cloud: Surface Reconstruction help needed (meshlab)

I am new to meshlab and am trying to reconstruct an stl file which has a number of issues such as over 700 self-intersecting faces, non-manifold edges and flipped triangles. The part I am trying to fix is a sunglass frame just to give you some perspective. I was able to remove the flipped triangles using Netfabb, which reduced the number of self-intersecting faces. I attempted to fix the rest of the problems by using features within the "Cleaning and Repairing" tab in Meshlab such as remove non-manifold edges and intersecting faces; however, I was unable to fix all problems with the features in the "Cleaning and Repairing" tab alone. Thus I decided to convert the mesh into a point cloud, calculate normals from the "Sampling" tab and try surface reconstruction: poisson. This method gave me a mesh that looked like a big blob instead of the detailed part that I was trying to achieve.
Can anyone please give me a step by step outline of how I can convert the point cloud back into a mesh with surface reconstruction while maintaining the part's dimensional integrity and avoiding self-intersecting faces? Or if you have any other suggestions, I'd be more than happy to listen.
Thank you!

How to draw a cylinder geometry using webgl?

I need to draw a cylinder geometry using webgl, but don't know how to realize it. The parameters may be radius,subdivisions and two central point of bottom faces.Any ideas will be appreciated,thanks~
Fundamentally, you will build it with triangles. It would be easiest to think of it more as an "n-sided" prism. The top and bottom faces will need to be made of triangle "fans", where each triangle shares one point in the center.
You will need to use simple math (including trigonometry) to calculate the locations of the points for each triangle.
If you don't know how to draw triangles with WebGL, check out NeHe's excellent WebGL guide at learningwebgl.com.

Resources