Author Topic: get center and radius of sphere by picking 3points  (Read 232 times)

0 Members and 1 Guest are viewing this topic.

motee-z

  • Newt
  • Posts: 38
get center and radius of sphere by picking 3points
« on: March 10, 2023, 12:16:12 PM »
Hello friends
any help for a lisp to get center and radius of sphere by picking 3d  3 points
thanks

ribarm

  • Gator
  • Posts: 2940
  • Marko Ribar, architect
Re: get center and radius of sphere by picking 3points
« Reply #1 on: March 10, 2023, 01:33:11 PM »
You meant 4 points - not coplanar?
3 points are needed for creating circle - do you need sphere with circle as equatorial parallel...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

motee-z

  • Newt
  • Posts: 38
Re: get center and radius of sphere by picking 3points
« Reply #2 on: March 10, 2023, 02:52:16 PM »
In autocad we use 3point in space not in the same level
But i know in mathemtic in we need four point in space to creat sphere so i dont know which is true

57gmc

  • Bull Frog
  • Posts: 221
Re: get center and radius of sphere by picking 3points
« Reply #3 on: March 10, 2023, 03:30:06 PM »
When you say "get center" do you mean find the properties of an existing sphere? All you would need is a single selection. Or do you mean, create a sphere?

motee-z

  • Newt
  • Posts: 38
Re: get center and radius of sphere by picking 3points
« Reply #4 on: March 10, 2023, 03:51:10 PM »
I need to get coordinate of center of sphere to draw the point of center because l have a lot of points on a shape i think it is a sphere so i want to pick necessary number of points then draw the center point of the sphere as point and get alert that radius is this all this without drawing the sphere if possible

motee-z

  • Newt
  • Posts: 38
Re: get center and radius of sphere by picking 3points
« Reply #5 on: March 11, 2023, 11:31:11 AM »
Ok if can,t get the answer can be know how to extract the information above from dxf code of a drawen sphere

ribarm

  • Gator
  • Posts: 2940
  • Marko Ribar, architect
Re: get center and radius of sphere by picking 3points
« Reply #6 on: March 11, 2023, 12:02:58 PM »
Sphere as 3DSOLID entity has center point (vla-get-center VLA-OBJECT)... But if you need to create SPHERE, you haven't answered to my question - 3 points in WCS give circle - do you want sphere from that circle, or 4 points not coplanar whereas each triangle has normal xline through center of circumscribed triangle and at intersections of those XLINEs, you obtain center point... Radius is pretty easy : R=(distance cenpt pttriang)
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

motee-z

  • Newt
  • Posts: 38
Re: get center and radius of sphere by picking 3points
« Reply #7 on: March 11, 2023, 12:38:27 PM »
Ok from 4 points