URBS:Non-Uniform Rational B-Splines

Maxim Shemanarev wrote:
> Well, that‘s too big topic I suppose. Jens somehow right, we need to stop at
> some point.

I think that NURBS will be just the right case to stop. I didn‘t have 
intention to go wild either.

However, in order to understand NURBS, and to be in the position to know 
where to find, and how to judge algorithms to use, when and why, 
performance, memory, etc-wise, I had to (re)learn a lot about the curves 
in general. In fact, I kept NURBS for last because, while we can ‘steal‘ 
MESA code, just for example, I have no idea what kind of algorithm it 
uses and how to cast it into AGG form. Not that I can not ‘massage‘ the 
code and get it integrated somehow, using purely programming skills, but 
I would be doing it without an ounce of understanding and you would at 
best get ‘something‘ that draws ‘something‘.

As another example, finding inverse matrices for Catmull-Rom or Hermite, 
in literature or on the Web, turned out to be next to impossible. 
Everybody copies from somobody else and covers the most obvious, common 
cases for illustrative and teaching putposes. After hours of Googling I 
had to download some pretty bad shareware that kept asking me to pay, in 
order to invert few 4x4 matrices. In fact, I invereted Hermite by hand, 
with pen and paper, disguested at downloading and compiling BOOST UBLAS 
or unnamed shareware just to invert the matrix.
As for NURBS, getting the improved Oslo algorithm from its original 
source requires money. I am not subscribed to SIAM journal so I have to 
work with ACM digital library and with what I can find there, in other 
literature and on the Web. Eventually, even if I had the original 
article it may be in such form that writing efficient C++ code from 
printed math formulas and recurrence relations may be very hard.

Zeros of w polynomial, used in division, is what worries me the most.

In retrospective, there were times when I could not get a nice, smooth 
curve through my points for ‘curve from Hell‘, because there were no 
appropriate tools in AGG. Now I can because the tools now exist. That‘s 
progress, IMO.
 Sorry, but I don‘t understand the discussion about higher degree curves. Why
> don‘t you create a finish converter that maxim can integrate in AGG with a
> short description what kind of curve(s) can be created with your code and
> with an explanation of the advantages?

For me the most important thing is the design. I‘d like to embed some more
curves into conv_curve so that you could easily interpolate or approximate
points. For now the additions are:
- General Bezier
- Catmul-Rom
- Uniform BSpline
- NURBS.

Catmul-Rom, for example, can be perfectly used as a replacement of existing
agg::conv_bspline. UBSpline is good for free-hand drawing.
> De Casteljau construction can be applied both to cubics and higher order 
> Beziers. After n applications de Casteljau using 1/2 interpolation 
> splits one n-th degree polynomial curve in half, making two n-th degree 
> Bezier curves, connected at their endpoints. Then they can be drawn as 
> two Beziers of the same degree. De Casteljau subdivision does not raise 
> the degree (highest polynomial power, parameter power) of the curve.

De Casteljau method allows you to divide one curve into 2 very easily. But it
doesn‘t reduce the degree!

> But I would be the last to deny that I never get completely confused and 
> lost trying to understand the curves (or, maybe it is the way they are 
> represented and explained.) I used not to have any conceptual trouble 
> with polynomials of any degree.

Well, I think, 50-100 degree Baziers are not really that important, so that,
I‘ll keep curve_casteljau together with your curve10. The conv_curve will
automatically switch to De Casteljau for curves of higher than 9th degree.
> -how many input points you have

Now it‘s namely so. If there are no objections I‘ll keep it as is.

> -do you want to approximate or to interpolate (and if interpolating then 
> interpolating just endpoints or all points)

I suppose there is no need for additional specifications. It‘ll be just
"catrom", "ubspline", "nurbs", etc. You just know that "catrom" interpolates,
"ubspline" approximates, etc.

> -what kind of control do you want over the initial curve‘s shape and/or 
> over modifications of a given shape?
> 
> -what is your criteria of smoothness? Parametric? Geometric? Happy with 
> cubics and stitching together a bunch of cubics or looking for higher 
> degrees?
> 
> -Modelling face? Modelling movement of physical objects? Making small, 
> precise modifications of the existing model?

Well, that‘s too big topic I suppose. Jens somehow right, we need to stop at
some point.
no.mac wrote:
> If it should be more than a demo, please explain the advantages of higher
> degree curves, may be with a short example from a real life application, or
> tell us where such curves are currently used and why.

For a real-life application and demo, even if it can be debated if this 
is the case for NURBS or for higher-degree Beziers, refer to my post 
titled: ‘Question about conv_bspline (Mesa OpenGL)‘ from 3/23/2005.

This case shows that interpolation of more than 3 points is not always 
desirable and that approximation gives visually more pleasant results.

One thing then led to another and various options started popping up in 
discussions.

摘自:http://sourceforge.net/p/vector-agg/mailman/vector-agg-general/?viewmonth=200504

时间: 2024-07-30 23:46:14

URBS:Non-Uniform Rational B-Splines的相关文章

python生成随机数:uniform(), randint(), gauss(), expovariate()

目录 22.python生成随机数:uniform(), randint(), gauss(), expovariate() 22.1 模块:random内建模块,伪随机数生成器 22.2 播种随机数,即用随机数种子seed控制随机数 22.3 在已知的范围内生成随机数,例如[2, 5],那就可以random.random()*3 + 2, uniform(2,5), randint(2,5) 22.4 从列表中随机选择一个值:choice(), choices() 22.5 shuffling

《Effective C++》资源管理:条款20-条款21

条款20:宁以pass-by-reference-to-const替换pass-by-value 在默认情况下,C++函数传递参数是继承C的方式,是值传递(pass by value).这样传递的都是实际实参的副本,这个副本是通过调用复制构造函数来创建的.有时候创建副本代价非常昂贵.例如一下继承体系 class Person{ public: Person(); virtual ~Person(); -- private: std::string name; std::string addres

Java基础:网络+socket

一:名词解释 TCP:Transmission Control Protocol传输控制协议 IP:Internet Protocol因特网互联协议 HTTP:Hypertext transfer protocol超文本传输协议 FTP:File Transfer Protocol文本传输协议 SMTP:Simple Mail Transfer Protocol简单邮件传输协议 Telnet:远程登录服务 二:TCP/IP模型 三:通讯的基础 (1)IP地址来唯一标识计算机 (2)port端口号

uva 10808 - Rational Resistors(基尔霍夫定律+高斯消元)

题目链接:uva 10808 - Rational Resistors 题目大意:给出一个博阿含n个节点,m条导线的电阻网络,求节点a和b之间的等效电阻. 解题思路:基尔霍夫定律,任何一点的电流向量为0.就是说有多少电流流入该节点,就有多少电流流出. 对于每次询问的两点间等效电阻,先判断说两点是否联通,不连通的话绝逼是1/0(无穷大).联通的话,将同一个联通分量上的节点都扣出来,假设电势作为变元,然后根据基尔霍夫定律列出方程,因为对于每个节点的电流向量为0,所以每个节点都有一个方程,所有与该节点

通信协议:HTTP、TCP、UDP

转载地址:http://blog.jobbole.com/84429/ TCP   HTTP   UDP: 都是通信协议,也就是通信时所遵守的规则,只有双方按照这个规则“说话”,对方才能理解或为之服务. TCP   HTTP   UDP三者的关系: TCP/IP是个协议组,可分为四个层次:网络接口层.网络层.传输层和应用层. 在网络层有IP协议.ICMP协议.ARP协议.RARP协议和BOOTP协议. 在传输层中有TCP协议与UDP协议. 在应用层有FTP.HTTP.TELNET.SMTP.DN

读书笔记2:uwp界面布局管理

布局管理是从一个整体的角度去把握应用程序的界面设计.在UWP中界面布局面板主要有Grid.Canvas.StackPanel.RelativePanel.在一个应用程序中,所有元素的最顶端必须是一个面板(默认为Grid).从布局的角度,外层面板管理里面的面板,一层一层递归下去,最后展现出来的就是整个应用程序的布局效果.其中的每一个布局的面板都有自己的规则,面板拥有完全的分配权,不仅仅是分配空间,还决定元素的位置. 布局属性和面板 1.布局的通用属性 在控件的基类FlameworkElement类

知识点: Python random模块(获取随机数)常用方法和使用例子

共通处理 import random 1:random.randomrandom.random()用于生成一个0到1的随机符点数: 0 <= n < 1.0 random.random() >>>0.8281061383805107 2:random.uniformrandom.uniform(a, b),用于生成一个指定范围内的随机符点数,两个参数其中一个是上限,一个是下限.如果a > b,则生成的随机数n: a <= n <= b.如果 a <b,

Rational Rose2007无法正常启动解决方式

安装完Rational Rose发现无法正常启动,我遇到了下面两个问题,希望能帮到同样经历的同学. 问题一: 安装完Rational Rose后不能用,提演示样例如以下:无法启动此程序,由于计算机中丢失suite object.dll.尝试又一次安装该程序以解决此问题. 出现这样的现象主要是,安装程序自己主动设置在 Path 中的环境变量有误. 解决方法: 首先找到suite object.dll文件,例如以下图 我们要注意这里的"Common".然后在控制面板中找到"高级系

如何更有效使用 Rational AppScan 扫描大型网站,第 2 部分: 案例分析

使用 AppScan 进行扫描 针对大型网站的扫描,我们按照戴明环 PDCA 的方法论来进行规划和讨论,建议 AppScan 使用步骤:计划(Plan).执行(Do).检查(check).分析(Analysis and Action). 在计划阶段:明确目的,进行策略性的选择和任务分解. 明确目的:选择合适的扫描策略 了解对象:首先进行探索,了解网站结构和规模 确定策略:进行对应的配置 按照目录进行扫描任务的分解 按照扫描策略进行扫描任务的分解 执行阶段:一边扫描一遍观察 进行扫描 先爬后扫(继