reb
Class ImageTrapModeSecondFarthest
Object
common:Generic
reb:ImageTrapMode
reb:ImageTrapModeWithThreshold
reb:ImageTrapModeSecondFarthest
- Direct Known Subclasses:
- IMageTrapModeTwoFarthest
class
- ImageTrapModeWithThreshold:ImageTrapModeSecondFarthest
This trap mode uses the second farthest trapped point that is within the threshold.
Ultra Fractal Source
Toggle UF Source Code Display
class ImageTrapModeSecondFarthest(ImageTrapModeWithThreshold) {
; This trap mode uses the second farthest trapped point that is within the threshold.
public:
import "common.ulb"
; constructor
func ImageTrapModeSecondFarthest(Generic pparent)
ImageTrapModeWithThreshold.IMageTrapModeWithThreshold(pparent)
endfunc
; initialize the object
func Init(complex pz)
ImageTrapModeWithThreshold.Init(pz)
m_Solid = true
endfunc
; call for each iterated point
func Iterate(complex pz, complex pzt, float pdistance, float ptexture, color pcolor)
ImageTrapModeWithThreshold.Iterate(pz, pzt, pdistance,ptexture,pcolor)
m_a = alpha(pcolor)
if (pdistance >= m_Distances[0] && pdistance < m_Threshold && m_a >= m_AThreshold)
m_Distances[1] = m_Distances[0]
m_UntransformedPoints[1] = m_UntransformedPoints[0]
m_Textures[1] = m_Textures[0]
m_TransformedPoints[1] = m_TransformedPoints[0]
m_IterationPoints[1] = m_IterationPoints[0]
m_ImagePoints[1] = m_imagePoints[0]
m_Distances[0] = pdistance
m_Textures[0] = ptexture
m_UntransformedPoints[0] = pz
m_TransformedPoints[0] = pzt
m_IterationPoints[0] = m_Iterations
m_ImagePoints[0] = pcolor
m_Solid = false
elseif (pdistance >= m_Distances[1] && pdistance < m_Threshold && m_a > m_AThreshold)
m_Distances[1] = pdistance
m_UntransformedPoints[1] = pz
m_TransformedPoints[1] = pzt
m_IterationPoints[1] = m_Iterations
m_ImagePoints[1] = pcolor
m_Solid = false
endif
edgefade(pdistance)
endfunc
func Result()
m_Distances[0] = abs(m_Distances[0] - m_Distances[1])
m_UntransformedPoints[0] = m_UntransformedPoints[0] - m_UntransformedPoints[1]
m_Textures[0] = m_Textures[0] - m_Textures[1]
m_TransformedPoints[0] = m_TransformedPoints[0] - m_TransformedPoints[1]
m_IterationPoints[0] = abs(m_IterationPoints[0] - m_IterationPoints[1])
m_ImagePoints[0] = (m_imagePoints[0]+ m_ImagePoints[1])/2
endfunc
default:
title = "Second Farthest"
int param v_secondfarthest
caption = "Version (Second Farthest)"
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_secondfarthest < 100
endparam
}
Method Summary |
void |
Init(complex pz)
initialize the object |
void |
Iterate(complex pz,
complex pzt,
float pdistance,
float ptexture,
color pcolor)
call for each iterated point |
void |
Result()
call this to compute final results |
Methods inherited from class Object |
|
ImageTrapModeSecondFarthest
public ImageTrapModeSecondFarthest(Generic pparent)
- constructor
ImageTrapModeSecondFarthest
public ImageTrapModeSecondFarthest()
Init
public void Init(complex pz)
- initialize the object
- Overrides:
Init
in class ImageTrapMode
Iterate
public void Iterate(complex pz,
complex pzt,
float pdistance,
float ptexture,
color pcolor)
- call for each iterated point
- Overrides:
Iterate
in class ImageTrapMode
Result
public void Result()
- Description copied from class:
ImageTrapMode
- call this to compute final results
- Overrides:
Result
in class ImageTrapMode