recently I was trying to solve this problem:
If I know 3D position vectors P0 and P1 how would I go about solving for P2 and P3?
I assumed it would be by taking the cross product of the vector P1 - P0 with an arbitrary basis vector like (0,1,0)
Vector3 perpendicularVector = Vector3.Cross((P1-P0), Vector3.Up);
but I wasn't able to make that work.
Any help on why my understanding is flawed and what I need to study to be able to understand a problem like this would be greatly appreciated!
Thanks for your answer! I was pretty sure I was going about this problem the incorrect way...curse my art degree!
Maybe I can clarify what I'm attempting and you can tell me the proper way to go about solving a problem like this.
Say a user can draw a line by choosing a starting location on a 2d grid and an ending location on that same 2d grid.
I'd like to have that action result in the pictured rectangle and not just the 2 points that the user provided.
Does that make any more sense?
of topic: If there is a text that would help me more accurately understand these types of problems that you can recommend I'd love any suggested readings!
I constrained my "clarification example" to 2 dimensions because I thought it would make the explanation easier...
The ultimate solution I was looking for would be in 3 dimensions.
I want to find the corners of a cube with arbitrary length, width, and depth but I only have to 2 positions in 3D space, and the Basis vectors as input.
If that problem is nonsensical (and the more I say it, it sure sounds like it) then I apologize for wasting your time, but appreciate the knowledge.
Thanks yeah I got that far as well,
made the cube at the origin with the arbitrary lengths then transformed that result to the position P0 and oriented to look at P2,
I just feel like there is a major bit of Vector transformations and indeed Vector's themselves that I'm missing something fundamental here.
Thanks for your help!