Finding intersection point between a line an a 3d surface

How do i find the point of intersection between a line and a 3d surface?

I have the data to plot the line, although the line is not straight (has a bend), whilst the surface is a cone section
0
Shenil
9/29/2010 2:08:21 PM
comp.soft-sys.matlab 207287 articles. 1 followers. lunamoonmoon (258) is leader. Post Follow

4 Replies
1863 Views

Similar Articles

[PageSpeed] 23
"Shenil " <shenilws@yahoo.com> wrote in message <i7vh8l$4rf$1@fred.mathworks.com>...
> How do i find the point of intersection between a line and a 3d surface?
> 
> I have the data to plot the line, although the line is not straight (has a bend), whilst the surface is a cone section

You need to fit equations to these surfaces and to the line. With these equations, you can then solve for the intersection. 

If your bent line consists of 2 straight-line pieces, it is only relevant to fit the piece that intersects the surface with a straight line (if it is not piece-wise straight, then we shouldn't really be calling it a line, but rather a curve).
0
Matt
9/29/2010 2:21:05 PM
"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <i7vi0h$sbh$1@fred.mathworks.com>...
> "Shenil " <shenilws@yahoo.com> wrote in message <i7vh8l$4rf$1@fred.mathworks.com>...
> > How do i find the point of intersection between a line and a 3d surface?
> > 
> > I have the data to plot the line, although the line is not straight (has a bend), whilst the surface is a cone section
> 
> You need to fit equations to these surfaces and to the line. With these equations, you can then solve for the intersection. 
> 
> If your bent line consists of 2 straight-line pieces, it is only relevant to fit the piece that intersects the surface with a straight line (if it is not piece-wise straight, then we shouldn't really be calling it a line, but rather a curve).

Thanks for replying, i have the equation of the line and yes it is in 2 pieces, so need to consider both pieces.  However, how do fit equations to the surfaces?
Cheers
0
Shenil
9/29/2010 2:42:04 PM
"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <i7vi0h$sbh$1@fred.mathworks.com>...
> "Shenil " <shenilws@yahoo.com> wrote in message <i7vh8l$4rf$1@fred.mathworks.com>...
> > How do i find the point of intersection between a line and a 3d surface?
> > 
> > I have the data to plot the line, although the line is not straight (has a bend), whilst the surface is a cone section
> 
> You need to fit equations to these surfaces and to the line. With these equations, you can then solve for the intersection. 
> 
> If your bent line consists of 2 straight-line pieces, it is only relevant to fit the piece that intersects the surface with a straight line (if it is not piece-wise straight, then we shouldn't really be calling it a line, but rather a curve).

By the way, the surface is created using surf
0
Shenil
9/29/2010 2:43:24 PM
"Shenil " <shenilws@yahoo.com> wrote in message <i7vj7s$lim$1@fred.mathworks.com>...

> Thanks for replying, i have the equation of the line and yes it is in 2 pieces, so need to consider both pieces.  
=======

No, as I said you don't need to consider both, assuming you know which piece intersects the surface. In that case only the equation for the intersecting piece is relevant.

>However, how do fit equations to the surfaces?
======



MATLAB has a Curve Fitting Toolbox

http://www.mathworks.com/products/curvefitting/

There are also a number of curve/surface fitting tools on the File Exchange.
0
Matt
9/29/2010 3:19:05 PM
Reply:
Similar Artilces:

Find and Grep together
Hi All, I am sorry if this is not the right group for this question. I am using find and grep together to find a string in a file from the top level directories. find . -name "*.c" -exec grep "string" {} \; -print | more. | \/ top level directorie I am sure that the string I am searching is in the lower directories where I am searching but this command is unable to find the string which I am looking. Can anyone please help me. My version control tool is clear case and my config spec also supports all the files....

Image analysis: point regrouping
Hi! My problem sound pretty simple (to me), but I am not quite sure how to tackle it. My overall goal is segmentation of 3d images (cells). I have been using a gradient flow tracking approach, which leaves a "sink" at the center of each cell. I have labeled this sink in the sink matrix. Because my images are not perfect though, I tend to have more than one sink per cell, leading to my program thinking that one object is actually multiple objects. What I want to do is cluster all points in the sink matrix (that are over 0) that are within a certain distance from one another ...

Multiply 3D array by 2D array
Sorry, brain tired... can someone remind me what the fastest way to do this is: a = rand(m,m,n); b = rand(m,m); for j=1:n a(:,:,j) = a(:,:,j) .* b; end spasmous: <SNIP <nightmare on elmstreet>, featuring robert englund and spasmous... one of the many solutions m=4; n=3; a=rand(m,m,n); b=rand(m,m); c=a.*repmat(b,[1 1 n]) us us wrote: > spasmous: > <SNIP <nightmare on elmstreet>, featuring robert englund and > spasmous... > > one of the many solutions > > m=4; > n=3; > a=rand(m,m,n); > b=rand...

How to find out the current version of the MySQL installation ?
How to find out (from the command line under Linux) the current version of the MySQL installation ? Or is there a config file which contains the version number ? Werner Werner Sammer <wersam@yahoo.de> wrote: > How to find out (from the command line under Linux) > the current version of the MySQL installation ? > Or is there a config file which contains the version number ? > Werner Command line: mysql --version Regards, Johan -- _____________________________________ Ing. Johan van Oostrum chaos geordend - www.chaosgeordend.nl _____________________________________ >...

finding max
Hello all I have a matrix a = 1 2 3 4 5 6 7 8 9 10 11 12 now I call max(a) ans = 9 10 11 12 to find the max, I have to call max(max(a)) Is there any way I can get the max of a matrix in one command? Thanks sore wrote: > > Hello all > > I have a matrix > > a = > > 1 2 3 4 > 5 6 7 8 > 9 10 11 12 > > now I call > > max(a) > > ans = > > 9 10 11 12 > > to find the max, I have to call max(max(a)) > > Is there any way I can get the max of a matrix > in one command? >...

Find it all
Find it all http://asb-comm-logicx.net/ ...

Narrowed down bottlneck to disk, how can I find out which FS is being hammered? 100% utilization
In my process of drilling down to get to the bottom of our performance issues, I am seeing huge I/O wait on a particular disk. What tools are available to dig deeper, find out which file system is hammering the disk and/or which processes are hogging the CPUS? We are talking 100% utilization here: mpstat output: CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl 0 199 0 259 12 2 176 9 22 30 0 1882 11 6 83 0 1 205 0 259 204 194 176 8 23 34 0 1801 11 5 84 0 2 203 0 289 34 23 176 7 23 31 ...

sparse 3d matrix or indexing
Hi, I would like to construct a sparse 3d matrix but MATLAB won't allow that. Is it possible to construct something like this (this code does not work): for i=1:5 A'i'= 'something; end to get an output of matrices A1, A2, ..., A5 On 2006-10-03 22:57 alex said the following: > Hi, > I would like to construct a sparse 3d matrix but MATLAB won't allow > that. Is it possible to construct something like this (this code does > not work): > for i=1:5 > A'i'= 'something; > end > to get an output of matrices A1, A2, ..., A5 Hi! 1. Spars...

Complicated Find Expression
Hi, I am having problems with my find expression. Basically I want to find to find all files that are _not_ in a test directory and then execute a grep statement on them. The result of that grep statement is further refined by another grep. Finally I would like to echo the result. My grep expression on works fine by itself. The problem is with the find integration. Here is my expression, followed by the output. Thanks for any suggestions/pointers, Mike find ./ -path '*test*' -prune -o -print -exec "grep -PRi 'out.print.*?[^/][^/].*?the' {} | grep -Pi 'out...

[ace-users] Can't find ACEd.dll
This is a multi-part message in MIME format. ------_=_NextPart_001_01C7A8F9.1452B078 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi=20 =20 ACE VERSION: 5.5.8 =20 HOST MACHINE and OPERATING SYSTEM: Win XP=20 If on Windows based OS's, which version of WINSOCK do you use?: don't know =20 TARGET MACHINE and OPERATING SYSTEM, if different from HOST: COMPILER NAME AND VERSION (AND PATCHLEVEL): =20 THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform- specific f...

triangle/triangle intersections
does anyone have any idea where to obtain a code to determine triangle/ triangle intersections and their intersection point(s)? it would be nice if this could also handle coplanar triangles. thanks On Aug 6, 7:58 pm, swars...@gmail.com wrote: > does anyone have any idea where to obtain a code to determine triangle/ > triangle intersections and their intersection point(s)? it would be > nice if this could also handle coplanar triangles. > > thanks Hi, try this one: http://jgt.akpeters.com/papers/Moller97/tritri.html Jindra ...

ow-find without sun 'find' key
I've just moved over to a windows platform from solaris and have installed the windows version of xemacs 21.4. I'm having severe withdrawal symptoms from the loss of the sun 'find' key. So to correct this I would like to bind the M-s key combo to the ow-find function and M-S-s to the ow-find-backward function. I have 2 problems trying to achieve this. 1. I have sucessfully bound the M-s keys to the 'ow-find function using the following code in the init.el file. (define-key global-map [(meta ?s)] 'ow-find) However when I execute the function it returns the follo...

Find File Attributes
Hello, As a part of my application,I need to compare files generated everyday.I need not need to compare the file contents.I just need to compare the file size,the line count.The files are named in the format,Hyyyymmdd,H denoting History. At present,I use the Dir function to search for the physical existence of the file and I use the debug.print for functions such as filelen(path),GetAttr() etc. My question is how would I put this as a module so that I can use a date function to compare files generated today with that of yesterday (mondays files to be compared against fridays). Also is it pos...

Off-lining memory
Hi, Quick question : is it possible to off-line a bank of memory, in a similar way to off-lining a CPU with /usr/sbin/psradm -f ? Hardware is an E450, OS is Solaris 9. Ideally, this should be without bringing the system down - I've done some digging around with Google, but couldn't find anything that seemed to match... Thanks, -Mark In article <28602a55.0410190913.1a6b156d@posting.google.com>, mark.round7@ntlworld.com (Mark Round) wrote: > Quick question : is it possible to off-line a bank of memory, in a > similar way to off-lining a CPU with /usr/sbin/psradm -f ? Ha...

I need to find the rows that exist in one table but not in the other with condition
I need to find the rows that exist in one table but not in the other with this condition: (prod_name exist in table1 and not in table2.prod_name ) AND (prod_name exist in table1 and not in table2.'S'+prod_name ) explanation: i want to know if the product not exit and if the combination of the charachter "S" with the product Name also not exist at the other table B.R yuvi SELECT prod_name FROM table1 as A WHERE NOT EXISTS (select * from table2 as B where A.prod_name = B.prod_name) AND NOT EXISTS (select * from table2 as C where A....

find breakpoint programmatically
Hi All, &nbsp; I accidentally posted this question in the special interest forum by mistake so sorry for the duplicate post but i thought it might never get read over there. <a href="http://forums.ni.com/ni/board/message?board.id=BreakPoint&amp;message.id=4162" target="_blank">http://forums.ni.com/ni/board/message?board.id=BreakPoint&amp;message.id=4162</a> &nbsp; Hi all, &nbsp; I was wondering if there is a way to search the vi hierachy for breakpoints programmatically?&nbsp; Why you may ask? &nbsp; I have a piece of code that take...

Re: Find unique records and recode
data one; input old $; cards; 5269-7c 5269-8c 5269-8c 5269-3z 5222-7z 5222-7z 5222-7z ; data two; set one; by old notsorted; new + first.old; run; On Mon, 5 Sep 2005 07:24:43 -0700, tortoise <cychen9@GMAIL.COM> wrote: >Hi, >I have one character variable (old). >There are many combinations of "old" variable. >How could I find unique and recode those data to "new"????? > > old new >5269-7c 1 >5269-8c 2 >5269-8c 2 >5269-3z 3 >5222-7z 4 >5222-7z 4 >5222-7z ...

SMART'07 publications available on-line
Hi all, In case someone is interested, we made all publications from the 1st Workshop on Statistical and Machine learning approaches applied to ARchitectures and compilaTion (SMART'07) available on-line: http://www.hipeac.net/smart-workshop.html Cheers, Grigori =========================================== Grigori Fursin, PhD, Research Fellow, INRIA http://fursin.net/research ...

How to find out memory leak?
Hi, all! I'm having memory leak problem with my program, but can't find where's the leak. I have a program written in pure-Ruby. It implemented a Chinese word segment algorithm. I call `segment(text)' to get the result. But each time I call `segment', the memory usage of my program (Ruby) increased several handred K- bytes -- the number of bytes of increment is roughly equal during each call. I can see from outside (using `ps' or `top') that the memory is leaking. But I can't find where the leaking goes. I tried to use ObjectSpace.each_object to find out what ...

pro/piping tutorials
Hello, does anyone know where I could find tutorials about pro/E module: pro/ piping? I would really appreciate any info on this. Thanks a lot! This is a multi-part message in MIME format. ------=_NextPart_000_0033_01C79EE3.B10443C0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable <dugave_11@yahoo.com> wrote in message = news:1180099763.016860.34260@o5g2000hsb.googlegroups.com... Hello, does anyone know where I could find tutorials about pro/E module: pro/ piping? I would really appreciate any info on ...

Starting Safari from the command line
I would like to interact with Safari directly, without using 'open -a Safari' or cocoa, in order to launch Safari with a URL. Unfortunately, when I do this from my home directory: /Applications/Safari.app/Contents/MacOS/Safari http://apple.com/ Safari launches with the following address: file:///Users/davehoover/http://apple.com Is there any way to prevent Safari from adding the current working directory from the front of the provided URL? BTW, I'm on 10.4, MacBook. On 2006-04-19, dave.hoover@gmail.com <dave.hoover@gmail.com> wrote: > I would like to interact with ...

Help finding AIO w/Fax
I looking for an All In One with FAX (flatbed scanner) for less than $200. I have only been able to fine these two: Canon MP390 and HP Officejet 5510. I do not see any that are Epson, Dell, Ricoh or Samsung. I have ruled out Visioneer and Lexmark because of bad reviews. Does anyone know of any other they recommend. Thanks in advance for your help, Bill ...

3D game engines in pure C ?
Hi, I need a good 3D game engine which is best written in C (not C++) and which at least can be used in and with pure C programs. I have found many engines for C++ like CrystalSpace and OGRE3D. The only one for C I have found is Allegro. But it is not really a game engine. It is a collection of libraries which are fine to create game engines. So does anyone have some links to nice C game engines? Bye In article <bt4no5$3e4sv$1@ID-12889.news.uni-berlin.de>, Markus Kolb <usenet@tower-net.de> wrote: >I need a good 3D game engine which is best written in C (not...

help
I received an Excel data file that contains a "+/-" symbol (html code \&plu= smn; &plusmn;), that can be copied and displayed in Word, Notepad, "Kompoze= r" html editor, unix vi, pico editors, and load to/retrieve from MySQL oper= ated on linux. But when I need to manipulate the data in perl, I am lost a= s how to recognize the symbol with RE. Could anyone help? Thanks in advance! joe On 2012-12-15 07:19, Joe wrote: > I received an Excel data file that contains a "+/-" symbol (html code \&plusmn; &plusmn;), that can be copied and...

find.find
import fnmatch, os def find(pattern, startdir=os.curdir): matches = [] os.path.walk(startdir, findvisitor, (matches, pattern)) matches.sort() return matches def findvisitor((matches, pattern), thisdir, nameshere): # for name in nameshere: if fnmatch.fnmatch(name, pattern): fullpath = os.path.join(thisdir, name) matches.append(fullpath) can someone explain why (matches, pattern) is doing in this two funct? thanks In <eo15uq$hna$1@ss408.t-com.hr>, Gigs_ wrote: > import fnmatch, os > > def find(pattern, startdir=os...