dolphin.spatial3d · recipe ·

Example · Ripples around a point

Feed distance into a wave to make rings.

cpudolphin.materialsdolphin.mathdolphin.spatial3drecipe

Stripes vary along one coordinate. Rings vary with distance from a center. We can reuse the same wave and blend helpers by changing the value we feed into them. The square root of x*x + y*y gives distance in the X/Y plane. Points at the same distance receive the same blend weight. This is why the pattern forms rings.

start.yh · Dolphin material example

Status: complete-program

Example · Ripples around a point

Feed distance into a wave to make rings.

cpu · type checked

using dolphin.materials
using dolphin.math
using dolphin.spatial3d

Surface(Vector3 position) -> dolphinSurface
{
    float radius = Math.SqrtFloat(position.x * position.x + position.y * position.y)
    float ripple = DolphinSurfaceWave(radius, 24.0)
    Vector3 deep = Vector3(0.02, 0.05, 0.2)
    Vector3 foam = Vector3(0.1, 0.8, 1.0)
    return DolphinSurface(DolphinSurfaceMix(deep, foam, ripple), 0.4, 0.1, 0.0)
}

dolphinSurface center = Surface(Vector3(0.0, 0.0, 0.0))
Console.Log(Text.Format("{0}, {1}, {2}", center.color.x, center.color.y, center.color.z))
project.mech
manifestVersion = "2"
package = "api.example.recipe__shader_rings"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.materials"
version = "0.1.0"
path = "../../../dolphin/packages/materials"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"
Expected output
0.06, 0.425, 0.6
Notes and source

Lower frequency from 24.0 to 12.0, then shift the center by subtracting 0.3 from X before squaring it.

demonhunterlabs/app/lib/yeho-walkthrough.ts