My question is simple: how do you add a shadow effect (like the one in Kalles Fraktaler 2)? I have tried distance estimation, but have failed at creating it reliably. I would like a relatively fast method, but it doesn't have to be extremely accurate.
2026-04-02 10:17:46.1775125066
How to add shadow effect to 2D fractals?
128 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in PHYSICS
- Why is the derivative of a vector in polar form the cross product?
- What is meant by input and output bases?
- Does Planck length contradict math?
- Computing relative error with ideal gas law.
- Planetary orbits in a $4$-dimensional universe
- Applied Maths: Equations of Motion
- Return probability random walk
- What will be the velocity of a photon ejected from the surface of cesium by a photon with a frequency of 6.12E14 s^-1?
- What mathematical principal allows this rearrangement during simplifying
- Time when velocity of object is zero and position at that point in time
Related Questions in 3D
- Visualization of Projective Space
- Approximate spline equation with Wolfram Mathematica
- Three-Dimensional coordinate system
- Volume of sphere split into eight sections?
- Largest Cube that fits the space between two Spheres?
- Is $ABC$ similar with $A'B'C'$, where $A', B', C'$ are the projections of $A, B, C $ on a plane $\pi $.
- Intersection of a facet and a plane
- Distance from center of sphere to apex of pyramid?
- Looking for hints on the below 3D geometry problem.
- Finding the Euler angle/axis from a 2 axes rotation but that lies on the original 2 axes' plane
Related Questions in FRACTALS
- does the area converge?
- "Mandelbrot sets" for different polynomials
- Is the Mandelbrot set path-connected?
- Does the boundary of the Mandelbrot set $M$ have empty interior?
- What sort of function is this? (Logistic map?)
- effective degree for normalized escape-time of hybrids
- Julia set of $x_n = \frac{ x_{n-1}^2 - 1}{n}$
- A closed form for the sum $\sum_{s=0}^{n-1} e^{\frac{s(s+1)}{2}i\theta}$?
- Given a real number $d , (1<d<2)$, is there a fractal with fractal dimension $d$?
- How can one write a line element for non-integer dimensions?
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?

For a good description of the theory, with pseudo-code, see Arnaud Chéritat's wiki page on drawing the Mandelbrot set.
The implementation in Kalles Fraktaler 2 has two methods for calculating a 2D vector it calls (
diffx,diffy) (which I will abbreviate $(x,y)$ later):if derivatives have been calculated, it uses the components of the reciprocal of the directional (complex) distance estimate;
otherwise they're the difference in smooth iteration count between neighbouring pixels in the horizontal and vertical directions (
w,hwill be 1 for final colouring pass when all pixels have been evaluated).Then the background colour is mixed with black or white according to a non-linearly scaled dot product of this vector with the light direction.
The parameters for the colouring are three real numbers
SlopeAngle,SlopePowerandSlopeRatio, which I will call $\theta$, $P$ and $R$ in the following, that modifies the input RGB $\mathbf{c}_i$ (calculated via other means, for example mapping iteration counts to colours, or via distance estimation) to give output RGB $\mathbf{c}_o$:$$ d = P \cdot \begin{pmatrix} x \\ y \end{pmatrix} \cdot \begin{pmatrix} \cos(\theta) \\ \sin(\theta) \end{pmatrix} $$
$$ t = R \frac{\tan^{-1}(|d|)}{\pi / 2} $$
if $d > 0$, $$\mathbf{c}_o = (1 - t) \mathbf{c}_i$$ if $d < 0$, $$\mathbf{c}_o = (1 - t) \mathbf{c}_i + t \begin{pmatrix} 1 \\ 1 \\ 1 \end{pmatrix}$$