Hi Daniel!

Thank you a lot for your reply. I was focused on generating the bisector to
intersect two lines, but intersecting the actual plane is much simpler. I
made a little function to intersect a plane with a line (partially taken
from this stackoverflow post
<https://stackoverflow.com/questions/5666222/3d-line-plane-intersection>,
so credits to user ideasman42
<https://stackoverflow.com/users/432509/ideasman42>). I am now finishing of
the 'patch' to my code that is supposed to now correctly skip unnecessary
points and create a list with those who's regions we will actually cross.
Code probably tomorrow.

Mario.

On 8 September 2017 at 09:35, Daniel Roßberg <danielmrossb...@gmail.com>
wrote:

> Hi Mario,
>
> In 3D space, rectangular to a vector you have a plane and the vector is a
> normal vector of this plane.  In this plane are all vectors which are
> perpendicular to your first vector, i.e. the vectors which products with
> your first vector are 0.  This gives you a first equation with two
> variables.
>
> Next, you want to intersect the plane with a ray.  I.e., one vector from
> your plan has to be a multiple of the ray which gives you another equation.
>
> However, there should be examples in the BRL-CAD source code for this.
> E.g., the ray-trace of the half primitive is very similar to your problem.
> There, the intersection of a plane, given by a normal vector and a point in
> it, and a ray, given by a start point and a direction, will be computed.
>
> I hope this helps.
>
>
> Regards,
>     Daniel
>
>
>
> I'm facing a wall. I need to find a perpendicular vector with the
> condition that it will intersect a third vector.
> Basically, I have the ray and a vector drawn from my current point to the
> previous point.
> I want the perpendicular bisector of that vector to cross my ray, so that
> I can obtain the intersection between the bisector and the ray.
>
> For that I need two things:
> 1) Obtain the perpendicular vector. in 3D there are infinite options, but
> only one will cross the ray. How do I get the one I need?
> 2) Obtain the intersection point.
>
> I browsed through vmath.h but I didn't find anything that could help me.
> Do you know any macro that could be useful here?
> Otherwise I will need to make some of my own for this! If so, any ideas on
> how to approach it?
>
> Mario.
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BRL-CAD Developer mailing list
> brlcad-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to