Autocad challange
-
Hey.
I have been given a task to draw a one point perspective interior, but with a point made that if we make it in CAD, then we must not use any of the 3d functions and everything must be constructed in the same way as when doing it by hand. The thing that bothers me is that I can't find a way to accuratly construct a circle in a one point perspective. So does anyone have a trick for this?
-
nice to see someone is still teaching basic drafting skills... here this will help you.
http://www.khulsey.com/drawing-2-point-perspective.html
oh you said 1 point perspective... here ya go...
-
Hi
If you are using traditional methods of perspective projection, can you perhaps map quadrant points on the circle in your projection from the picture plane, then use polyline arcs, ellipses, or splines to trace approximate curves? And because these will have control points or grips you can move them till they look approx. correct. Just a quick guess. -
For odd shapes it's not really different from drawing rectangles or boxes.
Imagine the circle drawn on a grid, add the 'segments needed in each square of that grid drawn in the perspective view... A circle is usually an 'ellipse'... http://studiochalkboard.evansville.edu/lp-circle.html -
well automated or 3D application creation would defeat the purpose of the exercise would it not?
-
I could, but this would be very time consuming and once you need a lot of them, a more automated approach would be preferred.
I guess I could just try to avoid circles at all costsI think the best solution would be to find a script that allows me to quickly draw it in 3d space. It should work in these steps
- set the first point
- set the diameter
- set vanishing point
But obviously I lack the knowledge to make this myself. Would it be hard to script something like this for Autocad?
-
Well.. you couldn't ever draw a perfect circle in perspective by hand because the techniques available for drawing them just give you guidelines anyway, but given the circumstances that the work must be done in CAD, without making any real 3d objects, the best bet would be to use minor cheats to achieve a perfect one point perspective drawing that can not be made in real life.
-
TIG, a circle in one point perspective would be a deformed ellipse. So then you should either find a way to deform it to match the middle points of the edges( see red dots) or use a spline that can form this ellipse by using the middle construction points. I'll try to find some sort of bezier spline that can do the last then if nothing better comes in mind.
That would be just what mitcorb suggested but I'm just not sure of the precision of this approach.
-
A distorted 'ellipse' for a circle in 1pt perspective will vary depending on the camera's eye level above the circle's plane, and the circle's center relative to the view's direction.
The relative proportional offsets for the vertices of a 16-segment pseudo-circle projected to the enclosing square are shown in the image -
This shows a circle projected onto a vertical plane towards the camera eye point [later eye level dropped slightly so you can see the result - otherwise they both overlay exactly!].
It's be relatively easy to code.
Project each edge's vertices onto the vertical0plane in the direction of the camera.eye - the plane can be determined from the camera info too.
Join up the dots to make the edges projected to the plane.
You then have the circle [or any other shape] distorted onto the flat plane in perspective... -
Here's a quick example of a projectedges3plane tool
<span class="syntaxdefault"></span><span class="syntaxkeyword">require </span><span class="syntaxstring">'sketchup.rb'<br /></span><span class="syntaxkeyword">=</span><span class="syntaxdefault">begin<br />TIG </span><span class="syntaxkeyword">(</span><span class="syntaxdefault">c</span><span class="syntaxkeyword">) </span><span class="syntaxdefault">2011<br /></span><span class="syntaxkeyword">=</span><span class="syntaxdefault">end<br />module TIG<br /> UI</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">menu</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"Camera"</span><span class="syntaxkeyword">).</span><span class="syntaxdefault">add_item</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"TIG.projectedges2plane"</span><span class="syntaxkeyword">){</span><span class="syntaxdefault">self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">projectedges2plane</span><span class="syntaxkeyword">()}</span><span class="syntaxdefault">unless file_loaded</span><span class="syntaxkeyword">?(</span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">basename</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">__FILE__</span><span class="syntaxkeyword">))<br /> </span><span class="syntaxdefault">file_loaded</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">basename</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">__FILE__</span><span class="syntaxkeyword">))<br /> </span><span class="syntaxdefault">def self</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">projectedges2plane</span><span class="syntaxkeyword">()<br /> </span><span class="syntaxdefault">model</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model<br /> ents</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_entities<br /> view</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_view<br /> cam</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">view</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">camera<br /> eye</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">cam</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">eye<br /> tar</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">cam</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">target<br /> dir</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">cam</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">direction<br /> ss</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">selection<br /> es</span><span class="syntaxkeyword">=[]<br /> </span><span class="syntaxdefault">ss</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">each</span><span class="syntaxkeyword">{|</span><span class="syntaxdefault">e</span><span class="syntaxkeyword">|</span><span class="syntaxdefault">es </span><span class="syntaxkeyword"><< </span><span class="syntaxdefault">e </span><span class="syntaxkeyword">if </span><span class="syntaxdefault">e</span><span class="syntaxkeyword">.class==</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Edge</span><span class="syntaxkeyword">}<br /> if </span><span class="syntaxdefault">not ss</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">]<br /> </span><span class="syntaxdefault">UI</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">messagebox</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"No Edges in Selection!"</span><span class="syntaxkeyword">)<br /> return </span><span class="syntaxdefault">nil<br /> end<br /> model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">start_operation</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"TIG.projectedges2plane"</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">group</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">ents</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">add_group<br /> group</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">name</span><span class="syntaxkeyword">=</span><span class="syntaxstring">"TIG.projectedges2plane"<br /> </span><span class="syntaxdefault">gents</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">group</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">entities<br /> pp</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">eye</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">offset</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">dir</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">eye</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">distance</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">tar</span><span class="syntaxkeyword">)/</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">plane</span><span class="syntaxkeyword">=[</span><span class="syntaxdefault">pp</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">dir</span><span class="syntaxkeyword">]<br /> </span><span class="syntaxdefault">es</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">each</span><span class="syntaxkeyword">{|</span><span class="syntaxdefault">e</span><span class="syntaxkeyword">|<br /> </span><span class="syntaxdefault">ps</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">e</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">start</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">position<br /> vs</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">ps</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">vector_to</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">eye</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">ls</span><span class="syntaxkeyword">=[</span><span class="syntaxdefault">ps</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">vs</span><span class="syntaxkeyword">]<br /> </span><span class="syntaxdefault">pps</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">Geom</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">intersect_line_plane</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">ls</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">plane</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">pe</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">e</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">end</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">position<br /> ve</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">pe</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">vector_to</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">eye</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">le</span><span class="syntaxkeyword">=[</span><span class="syntaxdefault">pe</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">ve</span><span class="syntaxkeyword">]<br /> </span><span class="syntaxdefault">ppe</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">Geom</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">intersect_line_plane</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">le</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">plane</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">gents</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">add_line</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">pps</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">ppe</span><span class="syntaxkeyword">)<br /> }<br /> </span><span class="syntaxdefault">t0</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">Geom</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Transformation</span><span class="syntaxkeyword">.new()<br /> </span><span class="syntaxdefault">gents</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">intersect_with</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">true</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">t0</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">gents</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">t0</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">true</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">gents</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">to_a</span><span class="syntaxkeyword">)<br /> </span><span class="syntaxdefault">model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">commit_operation<br /> end<br />end</span>
It places a plane half way between the camera eye and target, it then projects the vertices of all selected edges onto that plane as a flat 2d grouped set of edges; to get the plane vertical use camera>2pt_perspective.
Copy/paste code into a file called 'TIG-projectedges2plane.rb' in the Plugins folder it appears as an item in the Camera menu.
Advertisement