silhouette points of planar curve
 1-4  5-24  25-34

Previous
Next
 From:  bemfarmer
11213.5 In reply to 11213.3 
Hi PEER,

For the parallel projection, place a Plane downstream of your curve, (in the projection direction).
Use Construct > Curve > Project to project your curve to the plane, as a line.
Draw lines from the two endpoints of said line, back upstream to intersect your curve, and perform Intersect to get the two points.

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
11213.6 
Can the Perspective Projection of your curve be done onto a Plane? (To form a line on the Plane...?)

Then the endpoints of the resulting line on a Plane drawn as lines back to the perspective point, and the intersection with your curve done???

Last years script:
https://moi3d.com/forum/index.php?webtag=MOI&msg=10807.7

- Brian

The Plane could be to the left, center between curve and point, or to the right?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
11213.7 
Can the script "ViewRaysThroughPoints2" be modified to project many arrayed points on the Curve, Through the projection point, onto a Plane? With the result a line on the Plane?

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11213.8 In reply to 11213.5 
@ Brian - re:

> Use Construct > Curve > Project to project your curve to the plane, as a line.

The tricky part is that although it will have the shape of a line, it is going to be a closed curve that's all squashed down and running back over itself. So it's not going to have 2 endpoints at the extrema like you would need. If I have understood.

@ Peer - thanks for the further examples. I don't think there is any way to automate this currently but I'll see about adding a method on curves to collect all the locations where there is a common tangent to a point or direction. Then to weed out the internal ones you could make a line and intersect it with the curve, if there is an intersection other than at the tangent point then you would skip it. And you'd do a similar line intersection test for the endpoints of an open curve as well.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  pressure (PEER)
11213.9 In reply to 11213.5 
Thank you Brian! Construct > Curve > Project is just the ticket for the parallel case.

Re:
> Can the script "ViewRaysThroughPoints2" be modified to project many
> arrayed points on the Curve, Through the projection point, onto a
> Plane? With the result a line on the Plane?

I need this to be pretty accurate, so if I were going that route it would probably have to be iterative rather than a uniform array. I worry that doing that well might be complicated. And it also seems like reinventing the wheel since the Tan points from the snapping mechanism when drawing a line from the point to the curve are basically what I'm trying to get. I just haven't figured out a way to get them using a script without manually moving the mouse around and actually snapping to them.

- Peer
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  pressure (PEER)
11213.10 In reply to 11213.8 
Hi Michael,

I guess we were typing at the same time.

Re:
> although it will have the shape of a line, it is going to be a
> closed curve that's all squashed down and running back over itself.

That's kind of what I was expecting and so didn't try it, but having actually tried it now that's not what I see happening. Like if I project the edge view of a circle onto a plane I get an open curve with endpoints at the right locations. It's not a nice simple line with only 2 control points, but it does have endpoints where I need them.

Re:
> I'll see about adding a method

Looking forward to it! Sounds cleaner for the parallel case too.

Re:
> Then to weed out the internal ones you could make a line and intersect
it with the curve, if there is an intersection other than at the tangent
point then you would skip it.

So draw a line through the point along the projection ray direction and verify that it only intersects the curve at that one point. I like it.

- Peer
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11213.11 In reply to 11213.10 
Hi Peer,

re:
> Like if I project the edge view of a circle onto a plane I get an open curve with
> endpoints at the right locations. It's not a nice simple line with only 2 control
> points, but it does have endpoints where I need them.

For the case of a circle it happens to have control points directly on the curve at the quadrants.

In a more general case like this it won't have any points like that:




The squashed curve has degenerate first derivatives with zero magnitude at the folding spots which tends to throw a monkey wrench into various numeric analysis stepping mechanisms.

It would probably be good to handle this case better in the project command by finding these spots before the projection and splitting it up at those points.


> So draw a line through the point along the projection ray direction and
> verify that it only intersects the curve at that one point.

Yup, it's like a ray fire visiblity test.

- MIchael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
11213.12 In reply to 11213.8 
Thank you Michael for explaining about the squashed curve. I imagine the squashed curve would not be well behaved with other commands...

The Perspective Projection reminds me of stereoscopic projection with a sphere, and also the "beachline" with voronoi.

In my two brief attempts, the Moi Silhouette command attempt in the plane of the curve, did not work. I wondered if it uses some different algorithm than the Moi Project command. Would a more conventional use of the Moi Silhouette command ever produce squashed curves?

The Moi Silhouette command seems to be an orthographic projection ?
Same for Moi Project command?

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11213.13 In reply to 11213.12 
Hi Brian,

re:
> In my two brief attempts, the Moi Silhouette command attempt in the plane of the curve, did not work.

The Silhouette command only works on surfaces or solids, not on curves.


> I wondered if it uses some different algorithm than the Moi Project command.

Silhouette is pretty different than Project, Silhouette steps along a surface tracing out a curve where surface normals are changing from pointing towards the eye point to pointing away from the eye point.

So for example a surface like this:



Silhouette will generate this:




> Would a more conventional use of the Moi Silhouette command ever produce squashed curves?

No I don't think it would generate squashed curves.


> The Moi Silhouette command seems to be an orthographic projection ?

You tell it which viewport you want to use and it uses whatever projection that view is using. Which will be orthographic if it's the Top/Front/Right view or if it's the 3D view it depends on if Options > View > 3D view projection = "Perspective" or "Parallel".

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11213.14 In reply to 11213.4 
hi Peer, so I guess that a ray fire / intersect method isn't going to be quite right for open curves.

Because like this:



So maybe what you need is to project each candidate point, the tangent points and the end points, onto a line that is orthogonal to the projection direction and take the minimum and maximum distances along that line:



- MIchael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  pressure (PEER)
11213.15 In reply to 11213.14 
Hi Michael,

Thank you for continuing to think about this. Not sure I get the part about minimum distances, but finding the pair of points with the maximum distance in the projection makes sense.

- Peer
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
11213.16 
Just a quick note, very limited testing:

If the closed curve is extruded, the Moi Silhouette command in Right view yields the two extreme points, (on short lines), plus others, for parallel case.

In 3D view, several different point, (on short lines) are available. (I guess due to camera or some other point) For point case? Need to Identify "camera" focus point? And move it to projection point?
ViewRaysThroughPoints2 script finds a "focal" point.
I do not know how to change camera eye point. There is a camera script.

(Maybe a waste of time:-) Maybe Moi Silhouette command contains useful code that could be modified?

- Brian

EDITED: 22 Sep 2023 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  MO (MO_TE)
11213.17 
Hi Peer
I hope I understand you right.
I've made this node to find highest and lowest points on a curve (according to the z axis), using its bounding box.
It works on curves drawn in front viewport,
But I guess you can modify its algorithm to use inside a script.


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11213.18 In reply to 11213.15 
Hi Peer,

re:
> Not sure I get the part about minimum distances

Just that usually when a point is projected onto a line you'll produce the signed distance for the position on the line. If you get that then you want the minimum and maximum of those.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
11213.19 
Maybe related to your subject...
A little trick for finding the Apex of something!
(the outermost point of something)

Draw a small vertical line around the supposed point!

Then draw a Point coming from the middle of this vertical using the "Help Lines": Perp / Perp

---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
11213.20 In reply to 11213.17 
Hi Mo,
don't have the PTS2pts node can you post it please.
Cheers
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  MO (MO_TE)
11213.21 In reply to 11213.20 
Hi Barry
It converts point objects to point array.

Edit: Looks like the "PTS2pts" node is deprecated.
Use this node instead: "objects/ObjtoArray"

EDITED: 24 Sep 2023 by MO_TE

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
11213.22 In reply to 11213.21 
Hi Mo,
getting error message using "objects/ObjtoArray" and "PTS2pts" ?
Not sure if the attached nod gives the answer.
Draw curve in top view.
By rotating the curve this will give the directional view asked for.
Cheers
Barry

Updated nod file to show silhouette and end points plus option to select a point view direction.
Note the point view focus is on origin but could be on curve bounding box centre if required.

EDITED: 25 Sep 2023 by BARRY-H

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
11213.23 In reply to 11213.14 
Hi Michael,
It seems like BoundingBix should work for this.

I was wonderimg about it’s calc being too loose and creating peer’s “inaccuracies”

Could there be a tick for “high accuracy” that could be enabled for particular sets when needed? So like bumping the tolerances for BoundingBox calc from .001 to .0001

So not bogging down the normal ops, but when needed, one is willing to have it be slower.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11213.24 In reply to 11213.23 
Hi Burr, in scripting there is actually already a loose bounding box vs accurate one.

But using bounding box for this involves another calculation for intersecting as well.

If I put in a method that gathers up all tangent spots on the curve I think it should give better accuracy.

- MIchael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-4  5-24  25-34