Code covered by the BSD License  

Highlights from
vector_plane_intersect

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 1.75 KB File ID: #36357
image thumbnail

vector_plane_intersect

by Val Schmidt

 

24 Apr 2012

A function to fine the point where a line intersects a plane.

| Watch this File

File Information
Description

Given 1) a line parameterized by a point in 3D space along with a 3x1 vector indicating the line's direction, and 2) the coefficients (a b c) of a plane (z = a*x + b*y + c), vector_plane_intersect calculates the point on the plane at which the line will intersect it.

Inf is returned when the line is parallel to the plane.

From the code...

%%
% A line in 3 D space is parameterized by
%
% x = xo + n*t;
% y = yo + n*t;
% z = zo + n*t;
%
% A plane in 3D space is parameterized by
%
% z = C(1)*x+C(2)*y+C(3)
%
% To find the point where the line intersects the plane we substitute the
% equations for x, y and z into the plane equation above and solve for t.
% Then evaluate the x, y and z equations at that point.

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File  
Everyone's Tags
line, mathematics, plane, vector
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.

Contact us