I've asked this question a few times but still can't understand the answers. I need a really dumbed down answer.

I have two points in 3D space:

Point1: (x,y,z)
Point2: (x,y,z)

I want to draw an arrow from point1 to point2. At point2 I'd like to draw a pyramid cap to mimic an arrow head. So I need to know how to generate an additional 4 points that are equally distributed around point 2 - if I connect them all to point 2 it will look like a pyramid whose tip is point2.

Can someone please tell me how to fill this in then (the four generated base points of the pyramid arrow head):

Did you not get the answer from the previous question?
It looks like you also want to move the points around point2 a little bit back toward point1, so add (point2-point1)*(1-(arrowhead length)/(line length)) to each of those points.
to add intermediate points, you can use
(Point1-Point2) × (Point0-Point2) * sin(45º)
+
(Point1-Point2) × (PointA-Point2) * cos(45º)
for every 22.5º

point0 can be any point not along the line through point1 and point2
perpendicular0 = (Point1-Point2) × (Point0-Point2)
perpendicular1 = perpendicular0*(radius of cone)/|perpendicular0|
perpendicular2 = perpendicular0 × (Point1-Point2) / |Point1-Point2|
pontx = point2+(point1-point2)*(length of cone)/|Point1-Point2| + sin(x)*perpendicular1+cos(x)*perpendicular2

0

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

do you mean that pointx is just any point that can be generated that will be at the base of the head (I just substitute in for 'x' a number between 0 - 360, depending on how many points I want in the base)?

|perpendicular0| will be 0 only if Point0, Point1, and Point2 are all on the same line
which is why Point0 can't be on that line.
individual components of perpendicular0 can be 0, in which case the corresponding component of perpendicular1 will be 0

It doesn't matter where you put the parenthesis, the result will be the same.

0

DJ_AM_JuiceboxAuthor Commented:

ok dumb question, but is there some guaranteed way of picking a point not coliear to point 1 and 2?

It looks like you also want to move the points around point2 a little bit back toward point1, so add (point2-point1)*(1-(arrowh

to add intermediate points, you can use

(Point1-Point2) × (Point0-Point2) * sin(45º)

+

(Point1-Point2) × (PointA-Point2) * cos(45º)

for every 22.5º