home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "DistortSpiral"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
-
- ' The center about which to twist.
- Public cx As Single
- Public cz As Single
-
- ' ************************************************
- ' Apply a shape distorting transformation to
- ' the point.
- ' ************************************************
- Sub Distort(x As Single, y As Single, z As Single)
- Dim r As Single
- Dim dx As Single
- Dim dz As Single
-
- dx = x - cx
- dz = z - cz
- r = Sqr(dx * dx + dz * dz) / 50 / 3.14
-
- x = cx + dx * Sin(r) - dz * Cos(r)
- z = cz + dx * Cos(r) + dz * Sin(r)
- End Sub
-