MCPcopy Create free account
hub / github.com/Kitware/VTK / mandelbrotTest

Function mandelbrotTest

Common/DataModel/Testing/Python/TestHyperTreeGrid3DMandel.py:39–57  ·  view source on GitHub ↗
(x, y, timeStep = 0)

Source from the content-addressed store, hash-verified

37# -----------------------------------------------------------------------------
38
39def mandelbrotTest(x, y, timeStep = 0):
40 count = 0;
41 cReal = float(x);
42 cImag = float(y);
43 zReal = 0.0;
44 zImag = float(timeStep) / 10.0;
45
46 zReal2 = zReal * zReal;
47 zImag2 = zImag * zImag;
48 v1 = (zReal2 + zImag2);
49 while v1 < 4.0 and count < 100:
50 zImag = 2.0 * zReal * zImag + cImag
51 zReal = zReal2 - zImag2 + cReal
52 zReal2 = zReal * zReal
53 zImag2 = zImag * zImag
54 count += 1
55 v1 = (zReal2 + zImag2)
56
57 return count == 100;
58
59
60def mandelbrotSide(bounds):

Callers 2

mandelbrotSideFunction · 0.70
shouldRefineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected