[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx/librenderables renderables.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx/librenderables renderables.py |
Date: |
Wed, 18 Sep 2002 07:50:21 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/09/18 07:50:21
Modified files:
gfx/librenderables: renderables.py
Log message:
Try different bulge functions
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/renderables.py.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
Patches:
Index: gzz/gfx/librenderables/renderables.py
diff -c gzz/gfx/librenderables/renderables.py:1.47
gzz/gfx/librenderables/renderables.py:1.48
*** gzz/gfx/librenderables/renderables.py:1.47 Wed Sep 18 07:40:09 2002
--- gzz/gfx/librenderables/renderables.py Wed Sep 18 07:50:21 2002
***************
*** 436,444 ****
""",
"ExtraClass" : """
inline ZPt bulge(ZPt& v) const {
// Modulate distance from origin
! float t = (1 + v.x * v.x + v.y * v.y);
! float m = 1 + v.z / t;
return ZPt(m * v.x, m * v.y, v.z);
}
ZPt bulge_inv(ZPt& p) const {
--- 436,458 ----
""",
"ExtraClass" : """
inline ZPt bulge(ZPt& v) const {
+ //For given z, the magnification range is [ 1 - z/8, 1 + z ]
+ const float a = 1, b = 0, c = 1;
+
+ //For given z, the magnification range is [ 1, 1 + z ]
+ //const float a = 0.5, b = 0.5, c = 2
+
+ //For given z, the magnification range is [ 1, 1 + z ]
+ //const float a = 0.0, b = 1.0, c = 2;
+
// Modulate distance from origin
! float r2 = (v.x * v.x + v.y * v.y) * (c * c);
! float m = 1;
! m += a * v.z / (1 + r2);
! if (b > 0 && r2 > 0) {
! float r = sqrt(r2);
! m += v.z * atan(r) / r;
! }
return ZPt(m * v.x, m * v.y, v.z);
}
ZPt bulge_inv(ZPt& p) const {
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/11
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/12
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/16
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/17
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/18
- [Gzz-commits] gzz/gfx/librenderables renderables.py,
Janne V. Kujala <=
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Tuomas J. Lukka, 2002/09/20
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/27
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/27
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/27
- [Gzz-commits] gzz/gfx/librenderables renderables.py, Janne V. Kujala, 2002/09/28