I am trying to make a half circle in sketchup - sketchup

I'm trying to create essentially a half pipe shape in sketchup but having trouble. I can get an arc and build the shape, but it won't extrude.
Thanks,
Dirk

create a vertical rectangle then create your half circle on it.
Or using the tape measure, make sure all geometry is coplanar.
GIF explanation

Related

how to create a 3 dimensional circle window in spat stat?

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?

How to do rounded tapers in sketchup

how to do rounded tapers like this on sketchup 2018? What I did was, drawing the shape on both surfaces and tried deleting the surfaces. But it didn't create a new surface on taper. As you can see it has a hole, that you can see inside of that column, I want to fill it with a surface, so it can't be see through.
http://i68.tinypic.com/kbsu1s.jpg -- the sample pic
The simplest way is brute force. Turn on hidden geometry (View -> Hidden Geometry) and connect the opposing points to create faces.
Alternatively if you have a shape that matches the cutout, you can use intersection to create the fill faces. If you are new to SketchUp, I recommend learning about intersection (a simple google search of 'SketchUp intersection' will give you a great starting point).
You can achieve the desired result by doing the following:
1. Create object you wish to taper and draw the taper shape separately
2. Use the Follow Me tool to turn taper into a solid
3. Make it a component
5. Intersect its faces with model
6. Explode
7. Erase unnecessary geometry
8. Ctrl+Eraser to soften remaining geometry
And you end up with this:
final product

clipping polygon against rectangle

today I have a (simple) rendering problem for you. My current project gets datas from a file to generate a SVG file. Drawing things as polygon is pretty easy thanks to the SVG format, but I have a single problem: some of my polygons are in AND out of the page (meaning that some parts of them are displayed while the rest is not shown due to the fact they are out of the display limit). In order to optimize the final SVG file I need to reduce my polygon to a simpler form.
Consider the grey rectangle as my page.
Consider the green polygon as the thing I actually draw.
First picture shows you the thing that I actually have while the second picture shows you the final result I want to have.
First I thought to reduce my polygon in simple triangles in order to only draw points in the display limits. But I think a simpler solution exists... if you have it do not hesitate to share it with me :)
EDIT:
I have this tricky case to handle as well :
Thank you.
Clipping a polygon with a rectangle. We reduce this problem to
clipping a polygon with a line. We reduce this to an even simpler problem:
clipping one edge of a polygon with a line. Which is really just
Finding the intersection of a line segment with a line (if it exists).
The last problem is pretty easy, considering that your lines are vertical or horizontal. Is that enough?

Calculating 2D angles for 3D objects in perspective

Imagine a photo, with the face of a building marked out.
Its given that the face of the building is a rectangle, with 90 degree corners. However, because its a photo, perspective will be involved and the parallel edges of the face will converge on the horizon.
With such a rectangle, how do you calculate the angle in 2D of the vectors of the edges of a face that is at right angles to it?
In the image below, the blue is the face marked on the photo, and I'm wondering how to calculate the 2D vector of the red lines of the other face:
example http://img689.imageshack.us/img689/2060/leslievillestarbuckscor.jpg
So if you ignore the picture for a moment, and concentrate on the lines, is there enough information in one of the face outlines - the interior angles and such - to know the path of the face on the other side of the corner? What would the formula be?
We know that both are rectangles - that is that each corner is a right angle - and that they are at right angles to each other. So how do you determine the vector of the second face using only knowledge of the position of the first?
It's quite easy, you should use basic 2 point perspective rules.
First of all you need 2 vanishing points, one to the left and one to the right of your object. They'll both stay on the same horizon line.
alt text http://img62.imageshack.us/img62/9669/perspectiveh.png
After having placed the horizon (that chooses the sight heigh) and the vanishing points (the positions of the points will change field of view) you can easily calculate where your lines go (of course you need to be able to calculate the line that crosses two points: i think you can do it)
Honestly, what I'd do is a Hough Transform on the image and determine a way to identify the red lines from the image. To find the red lines, I'd find any lines in the transform that touch your blue ones. The good thing about the transform is that you get angle information for free.
Since you know that you're looking at lines, you could also do a Radon Transform and look for peaks at particular angles; it's essentially the same thing.
Matlab has some nice functionality for this kind of work.

How to rotate a picture using jogl?

Dear Friends,Can anyone tell me how to show one picture in GLCanvas and by using mouse how to rotate a picture in the GLCanvas.I m new to this jogl developement.Can u pls provide me how to do this.If possible provide me some code snippet and some reference site to get a clear idea about jogl developement.
regards,
s.kumaran.
To show an image on GLCanvas , create a polygon using gl.glBegin(GL.GL_POLYGON) and load the texture using the Class TextureIO .Then using the MouseListener in Java Swings ,you can easily control the rotation of the image(i.e,the textured polygon) by simply changing the position of Camera or doing some transformations( "gl.glRotate(angle,x-axis,y-axis,z-axis) in your case") in Model-View matrix .
The easiest way to do this will be to texture a Quad with the picture and then apply affine transforms to that Quad. Rendering this quad will let you see a rotating picture you can do pretty much any transform by shifting the vertices of the Quad.
I'm assuming that you are drawing a 3D scene and want to change it's orientation, rather than having a 2D image which you wish to rotate.
The short answer is that it takes place in two parts. You need to store an orientation of your scene as a 4x4 matrix (homogeneous matrix - search for it if you don't know what that is). You first need to write code that translates a mouse drag into a change of that 4x4 matrix. So when the mouse is dragged up apply an appropriate rotation or whatever to the matrix.
Then you need to redraw the scene, but using the new transformed 4x4 matrix. Use glMatrixMode to specify which matrix (use either GL_PROJECTION or GL_MODELVIEW) and then functions like glMultMatrixf() to manipulate the appropriate matrix.
If that didn't make sense pick up an OpenGL tutorial on how to rotate scenes. OpenGL and JOGL are close enough that methods from OpenGL work in JOGL.

Resources