/ concept-collection / turing-surface
Sign in
concept-collection / turing-surface
15 lines · 571 BCodeBlameHistory
62e6cc4Simplify UI text and built-in .m script commentsJeremy Magland 1% The unit sphere — the reference case.
62e6cc4Simplify UI text and built-in .m script commentsJeremy Magland 3% A geometry file defines shape(theta, phi, ...) -> gx, gy, gz: the surface
0ae15cfSeed runs from smooth random fields, and add the blob geometryDan Fortunato 4% over the solver's grid (all npts x 1). Unlike the models it runs once, on
5% the CPU through numbl's interpreter, so the full MATLAB subset is
6% available — loops, arrays, min/max, legendre, seeded randomness via
7% rng/randn. The host analyses the result into spherical-harmonic
8% coefficients, band-limited at lmax.
10function [gx, gy, gz] = shape(theta, phi)
11 st = sin(theta);
12 gx = st .* cos(phi);
13 gy = st .* sin(phi);
14 gz = cos(theta);
15end
moveopenescclose