光线可以在弯曲的路径上行进吗? [英] is ray can travel in curved path?

查看:58
本文介绍了光线可以在弯曲的路径上行进吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计,

我需要与某些表面的线/弧相交。

表面可能是平的或弯曲的。

i通过将线作为光线传递到曲面来使用线到曲面的交点。

但是我无法获得Arc到Surface的交点....给出一些想法..谢谢

前进....

Hi dude,
I am in need of Line/Arc intersection with some surface.
Surface may be flat or curved.
i use Line to Surface intersection by passing line as ray to surface.
but i cant able to get intersection for Arc to Surface.... give some ideas ..thanks in
Advance....

推荐答案

< quote>是光线可以在弯曲的路径上行进吗?



是,当它经过黑洞附近时。
<quote>is ray can travel in curved path?

Yes, when it passes near a black hole.


根据曲线或曲面的类型,没有直接的方法来计算交点。相反,你必须迭代曲线上的点,直到找到一个足够接近表面的点。



至少你需要:

1.曲线的参数化表示,您可以评估它来计算点数。

2.确定给定点到曲面的距离的函数,以及它是否为位于表面上方或下方。

3.一种优化算法,用于找到曲面最接近曲面的点



首先取决于在你的曲线上。



第二种取决于你的表面类型:最简单的情况是一个平面,通过计算平面法线的标量积来确定距离。曲线点和平面原点;对于曲面,您可以尝试使用更复杂的函数,或者使用平面小平面来近似它。



对于第三种,最简单的方法是继续二分法:首先计算曲线终点及其到表面的距离,以及中间点,然后通过查看这些点所在表面的哪一侧来细分曲线;你会想要在有交点的那部分曲线上继续你的搜索,所以一点必须在上面,一点在表面之下。



当然它比这复杂得多:曲线可以通过曲面而不会相交,或者它可能会相交几次。
Depending on the type of curve or surface there is no direct way to calculate the intersection. Instead you must iterate over points on the curve until you find one that is sufficiently close to the surface for your purposes.

At the very least you need:
1. A parametrized representation of your curve that you can evaluate to calculate points.
2. a function that determines the distance of a given point to the surface, as well as whether it lies above or below the surface.
3. an optimization algorithm to find the closest point of the curve to the surface

The first depends on your curve.

The second depends on your type of surface: the most simple case is a plane where the distance is determined by calculating the scalar product of the plane normal with the difference of the curve point and the plane origin; for curved surfaces you can either try to come up with a more complex function, or approximate it with planar facets.

For the third, the easiest method is continued bisection: you start by calculating the curve end points and their distance to the surface, as well as an intermediate point, then you subdivide the curve by looking at which side of the surface these points are on; you'll want to continue your search in that part of the curve that has the intersection, so one point must be above, and one below the surface.

Of course it's more complex than that: the curve may pass by the surface and not intersect it at all, or it may intersect it several times.


我不明白哪条光线(光线或光线) )



:)
i dont understand which ray (light's ray or mathamatical ray)

:)


这篇关于光线可以在弯曲的路径上行进吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆