Intersect between Surface and Ray

Intersect between Surface and Ray

We are searching data for your request:

Forums and discussions:
Manuals and reference books:
Data from registers:
Wait the end of the search in all databases.
Upon completion, a link will appear to access the found materials.

I am interested in finding the intersection of a Ray and a Surface in ArcObjects.

I already know of two solutions. First solution is to use theLocatemethod of ISurface:

Dim intersectionPoint As IPoint = surface.Locate(ray, hint)

The other solution is to use theGetLineOfSightmethod of IGeoDatabaseBridge (where the variablepointis a calculated point along the path of the ray):

Dim geoDatabaseBridge2 As IGeoDatabaseBridge2 = New GeoDatabaseHelper geoDatabaseBridge2.GetLineOfSight(surface, baseRay.Origin, point, intersectionPoint, Nothing, Nothing, Nothing, False, False)

Surprisingly, theGetLineOfSightmethod is much faster than thelocatemethod. But I am looking for an even faster solution.

So my question is: Is there any other (and faster) ways to find the intersection between a ray and a surface? Or can you point me in the direction of literature that explains the calculations I need to roll my own?


UPDATE: I have started the process of creating my own Line of Sight algorithm. I have posted my current solution description in a blog post. Thanks again for all of the suggestions.

If you really want to roll your own, it sounds like you may need a ray caster/ray tracer. A ten year old paper describes the state of the art (back then): you have to convert the surface to a TIN and create a 3D data structure (the authors propose a BSP tree of voxels) to expedite finding the intersections. Maybe you could get hold of a ray tracing engine and deploy it.

Watch the video: Calculating Ray-Sphere Intersections


  1. Kyrell

    Are there more options?

  2. Daemon

    I can not participate now in discussion - there is no free time. But I will be released - I will necessarily write that I think on this question.

  3. Yozshular

    and another variant is?

  4. Wally

    No conversations!

Write a message