| New Reply |
[Mathematica] How to use this code? |
Share Thread | Thread Tools |
| Jan19-12, 08:34 PM | #1 |
|
|
[Mathematica] How to use this code?
I have a notebook with the following code in it:
Code:
GratingFrame[n_, c_, k_, \[Theta]_, \[Phi]_] :=
Graphics[Raster[
Table[0.5 +
0.5 c Cos[
2 Pi k (i Cos[\[Theta] Pi/180]/n +
j Sin[\[Theta] Pi/180]/n) - \[Phi] Pi/180], {j, 1, n}, {i,
1, n}]]];
GratingMovie[n_, T_, c_, k_, \[Theta]_] :=
Module[
{nf = 16},
ListAnimate[
Table[GratingFrame[n, c, k, \[Theta], \[Phi]], {\[Phi], 0,
360 - 360/nf, 360/nf}], nf/T, ImageSize -> 200,
AnimatorElements -> "PlayPauseButton"]
]
|
| PhysOrg.com |
science news on PhysOrg.com >> Hong Kong launches first electric taxis >> Morocco to harness the wind in energy hunt >> Galaxy's Ring of Fire |
| New Reply |
| Thread Tools | |
Similar Threads for: [Mathematica] How to use this code?
|
||||
| Thread | Forum | Replies | ||
| looking for a generic code using Mathematica | Math & Science Software | 10 | ||
| mathematica not supporting graphs,,,code is as | Math & Science Software | 15 | ||
| Mathematica source code help... | Math & Science Software | 1 | ||
| Mathematica source code... | Math & Science Software | 1 | ||
| Mathematica code help | Math & Science Software | 24 | ||