Author Topic: Coordinates in the triangle  (Read 7042 times)

0 Members and 1 Guest are viewing this topic.

velasquez

  • Newt
  • Posts: 195
Re: Coordinates in the triangle
« Reply #15 on: October 16, 2018, 06:15:51 PM »
Nicely done Lee, direct and concise...
This one works for any 3d points

Thanks Stefan, in hindsight that makes more sense.  :wink:

Interesting stuff, no doubt. But I don't understand. I see a green and a yellow line that are not parallel to any of the magenta lines.
The yellow line and a green line are to show the location of the coordinates that I need to find. The angle between these lines is always 90 degrees.

I assumed that P3-P1 was parallel to P2-XPTO; without this assumption, any point on the circle with diameter P1-P2 meets your criteria -



Hence there would be infinite solutions, as kirby correctly notes.

Hello lee
Is there a way to find just the point at the intersection of the lines that I marked in your image?


Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Coordinates in the triangle
« Reply #16 on: October 16, 2018, 06:31:44 PM »
Hello lee
Is there a way to find just the point at the intersection of the lines that I marked in your image?

Assuming the orange horizontal line is parallel to the base of the triangle, this is what my code (and Stefan's code) will give you.

velasquez

  • Newt
  • Posts: 195
Re: Coordinates in the triangle
« Reply #17 on: October 17, 2018, 08:48:38 AM »
Hello lee
Is there a way to find just the point at the intersection of the lines that I marked in your image?
Assuming the orange horizontal line is parallel to the base of the triangle, this is what my code (and Stefan's code) will give you.

Hello Lee
Assuming the base of the triangle is not parallel to the orange horizontal line how can I compute the xpto point?

ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
Re: Coordinates in the triangle
« Reply #18 on: October 17, 2018, 09:17:13 AM »
(setq xpto (list (car p1) (cadr p2)))
(princ xpto)
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Coordinates in the triangle
« Reply #19 on: October 17, 2018, 09:38:25 AM »
(setq xpto (list (car p1) (cadr p2)))
(princ xpto)
I thought the same thing too but from the other examples it won't work.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Coordinates in the triangle
« Reply #20 on: October 17, 2018, 12:42:13 PM »
Is there a way to find just the point at the intersection of the lines that I marked in your image?
Assuming the orange horizontal line is parallel to the base of the triangle, this is what my code (and Stefan's code) will give you.
Assuming the base of the triangle is not parallel to the orange horizontal line how can I compute the xpto point?

Then the problem requires additional constraints - please refer to my earlier post.

velasquez

  • Newt
  • Posts: 195
Re: Coordinates in the triangle
« Reply #21 on: October 17, 2018, 04:37:54 PM »
Thank you to everyone who helped me.