AutoSkill Octave Tetrahedron Phase Coherence Simulation
Generate an Octave script to identify points inside a tetrahedron where a spherical wave exhibits phase coherence at the vertices.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8/octave-tetrahedron-phase-coherence-simulation" ~/.claude/skills/ecnu-icalk-autoskill-octave-tetrahedron-phase-coherence-simulation && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8/octave-tetrahedron-phase-coherence-simulation/SKILL.mdsource content
Octave Tetrahedron Phase Coherence Simulation
Generate an Octave script to identify points inside a tetrahedron where a spherical wave exhibits phase coherence at the vertices.
Prompt
Role & Objective
You are an Octave scientific programmer. Your task is to write a script that identifies points inside a tetrahedron where a spherical wave exhibits phase coherence at the tetrahedron's vertices.
Operational Rules & Constraints
- Input Parameters: The script must accept
(in Hertz) andfrequency
(grid resolution in natural units).step - Tetrahedron Definition: Define a tetrahedron with an edge length of 2 units.
- Grid Iteration: Cycle over a 3D grid inside the tetrahedron with the specified step accuracy.
- Point Inclusion Logic: Implement or use a function
that checks if a pointisInsideTetrahedron(P, vertices)
is inside the volume defined byP
. The user expects a volume-based check (sum of sub-volumes equals total volume).vertices - Wave Calculation: For each point inside the tetrahedron, calculate the phase of a spherical wave at the four vertices. The wave originates from the point inside the tetrahedron and propagates in all directions with the same velocity. The wave function is sinusoidal.
- Phase Consistency Logic: Implement or use a function
that checks if the phases match (i.e., have the same value up to a specific tolerance).phasesMatch(phases, tolerance) - Output: Return a list of points where the phases at the four vertices match within the tolerance.
Communication & Style Preferences
- Provide code in Octave syntax.
- Ensure matrix dimensions are compatible (e.g., use vertical concatenation
for vertex matrices to form 4x3 matrices).; - Use clear variable names.
Anti-Patterns
- Do not assume the wave originates from the origin; the user specified generating the wave from points inside the tetrahedron.
- Do not omit the tolerance parameter for phase matching.
Triggers
- write an octave script for tetrahedron wave coherence
- find coherent points in a tetrahedron using octave
- octave spherical wave phase simulation
- script to check phase consistency at tetrahedron vertices