4
$\begingroup$

How to generate conical curve with geometry nodes using only two points and sweep angle as input parameters?

enter image description here Two points (represented by empty position for illustration).

enter image description here

Sweep angle in this example would be 180 degrees (half circle).

enter image description here Sweep angle in this example would be 90 degrees (quarter circle).

$\endgroup$
2
  • 1
    $\begingroup$ With only two points, aren't there an infinite number of potential cones? You're assuming a third point there to make a triangle, I think, and you're assuming it's directly up from the origin point, thus causing the cone to rotate around the Z axis - but, unless that assumption is specified, geometry nodes can't assume that, it might be in any orientation. $\endgroup$
    – Ben
    Commented Jun 13, 2022 at 1:36
  • $\begingroup$ I think with 2 points + sweep angle the only variable is which point is the pointy end of the cone and if the sweep is left or right direction. The local Z axis of the cone would likely be relative to the vector between the two points. $\endgroup$
    – stackzz
    Commented Jun 13, 2022 at 22:22

2 Answers 2

3
$\begingroup$

This might be helpful (I assume that the Cone is always upright):

enter image description here

enter image description here

  1. First I put both points on a plane (X/Y).

  2. Then I use the direction vector between the two points and calculate an angle, which serves me as starting point of the arc.

  3. The distance between the two points serves me as radius.

  4. With this I create an arc.

  5. I set the arc back to the Z-position of the first point.

  6. With Curve to Mesh and Extrude Mesh I create the mesh.

  7. I set the tip of the cone to the position of the second point and merge all points there.

$\endgroup$
1
$\begingroup$

you can get the effect by this node tree setup:

enter image description here

but i am sure some other guys come up with a more lean solution and less nodes ;)

but it works ;)

enter image description here

$\endgroup$
1
  • $\begingroup$ this solution "works" but it's less accurate because the start and end point of the arc are affected by the the resolution of the cylinder. The other solution uses empties to specify exact points for start and end points of the arc. $\endgroup$
    – stackzz
    Commented Aug 24, 2022 at 0:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .