reb
Class Seven_Klein_Group
Object
common:Generic
common:Transform
common:UserTransform
reb:Seven_Klein_Group
class
- UserTransform:Seven_Klein_Group
Modified from Morgan Owens' Fractint frm
Ultra Fractal Source
Toggle UF Source Code Display
class Seven_Klein_Group(common.ulb:UserTransform) {
; Modified from Morgan Owens' Fractint frm
public:
import "common.ulb"
; constructor
func Seven_Klein_Group(Generic pparent)
UserTransform.UserTransform(pparent)
float ang=#pi/3
c1=0
c2=1
c3=exp((0,1)*ang)
c4=exp((0,2)*ang)
c5=exp((0,3)*ang)
c6=exp((0,4)*ang)
c7=exp((0,5)*ang)
r=1/2
rr=r*r
endfunc
; call for each iterated point
complex func Iterate(complex pz)
UserTransform.Iterate(pz)
int i = 0
complex z=pz*@scale
while i < @iter
if(|z-c1|<rr)
z=r*conj(r/(z-c1))+c1
elseif(|z-c2|<rr)
z=r*conj(r/(z-c2))+c2
elseif(|z-c3|<rr)
z=r*conj(r/(z-c3))+c3
elseif(|z-c4|<rr)
z=r*conj(r/(z-c4))+c4
elseif(|z-c5|<rr)
z=r*conj(r/(z-c5))+c5
elseif(|z-c6|<rr)
z=r*conj(r/(z-c6))+c6
elseif(|z-c7|<rr)
z=r*conj(r/(z-c7))+c7
endif
i = i + 1
endwhile
return z*@scale
endfunc
protected:
complex c1
complex c2
complex c3
complex c4
complex c5
complex c6
complex c7
float r
float rr
default:
title = "Seven Klein Group"
int param v_sevenkleingroup
caption = "Version (Seven Klein Group)"
default = 100
hint = "This version parameter is used to detect when a change has been made to the formula that is incompatible with the previous version. When that happens, this field will reflect the old version number to alert you to the fact that an alternate rendering is being used."
visible = @v_sevenkleingroup < 100
endparam
int param iter
caption = "# Iterations"
default = 10
endparam
float param scale
caption = "Scale"
default = 1.0
endparam
}
Methods inherited from class Object |
|
Seven_Klein_Group
public Seven_Klein_Group(Generic pparent)
- constructor
Seven_Klein_Group
public Seven_Klein_Group()
Iterate
public complex Iterate(complex pz)
- call for each iterated point
- Overrides:
Iterate
in class Transform
- Parameters:
pz
- the complex value to be transformed
- Returns:
- the transformed value