reb
Class ImageTrapModeProduct
Object
common:Generic
reb:ImageTrapMode
reb:ImageTrapModeWithThreshold
reb:ImageTrapModeProduct
class
- ImageTrapModeWithThreshold:ImageTrapModeProduct
trap mode variant based upon a class of Damien Jones
Ultra Fractal Source
Toggle UF Source Code Display
class ImageTrapModeProduct(ImageTrapModeWithThreshold) {
; trap mode variant based upon a class of Damien Jones
public:
import "common.ulb"
; constructor
func ImageTrapModeProduct(Generic pparent)
ImageTrapModeWithThreshold.ImageTrapModeWithThreshold(pparent)
endfunc
; initialize the object
func Init(complex pz)
ImageTrapModeWithThreshold.Init(pz)
m_Solid = true
int j = 0
while (j < 4)
m_Distances[j] = 1.0
m_Textures[j] = 1.0
m_UntransformedPoints[j] = 1
m_TransformedPoints[j] = 1
m_IterationPoints[j] = 1
j = j + 1
endwhile
endfunc
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_Threshold && m_a >= m_AThreshold)
float id = 1.0 / m_Threshold
m_Distances[0] = m_Distances[0] * pdistance * id
m_Textures[0] = m_Textures[0] * ptexture * id
m_UntransformedPoints[0] = m_UntransformedPoints[0] * pz * id
m_TransformedPoints[0] = m_TransformedPoints[0] * pzt * id
m_IterationPoints[0] = m_IterationPoints[0] * m_Iterations
m_Solid = false
m_ImagePoints[0] = pcolor
edgefade(pdistance)
endif
endfunc
func Result()
m_Distances[0] = abs(m_Distances[0])
endfunc
default:
title = "Product"
int param v_trapmodeproduct
caption = "Version (TrapMode Product)"
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_trapmodeproduct < 100
endparam
}
Method Summary |
void |
Init(complex pz)
initialize the object |
void |
Iterate(complex pz,
complex pzt,
float pdistance,
float ptexture,
color pcolor)
call this for each point |
void |
Result()
call this to compute final results |
Methods inherited from class Object |
|
ImageTrapModeProduct
public ImageTrapModeProduct(Generic pparent)
- constructor
ImageTrapModeProduct
public ImageTrapModeProduct()
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)
- Description copied from class:
ImageTrapMode
- call this for each 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