Friday, December 26, 2008

Nuttet 3d visualisering af elliptisk kurve, med mulighed for selv at skrue på parametre

Meget meget nuttet tredimensionel demonstration af elliptiske kurver. Anvend i Mathematica følgende kode:
(eller se det online i linket under koden)

Manipulate[{F, G} = { x^3 - a y^2 + b x y^2 + c x^2 y, A x + B};
Plot3D[{F, G}, {x, -8, 10}, {y, -30, 30}, PlotRange -> All,
PlotStyle -> {LightBlue, Green},
MeshFunctions -> Function @@@ {{{x, y, z}, (F - G)}}, Mesh -> {{0}},
MeshStyle -> Directive[{Red, Thick}],
Epilog -> {Inset[
Graphics[
Text[Style[
Column[{"intersection curve",
Row[{a y^2, " = ", x^3 + b x y^2 + c x^2 y - A x - B}]},
Center], {12, 12}, Black]], ImageSize -> 240], {Center,
Top}], Inset[
Graphics[
Text[Style[
Column[{"surface", Row[{Style["z", Italic], " = ", F}]}], {12,
12}, Black]], ImageSize -> 200], {0.3, .1}],
Inset[Graphics[
Text[Style[
Column[{"plane", Row[{Style["z", Italic], " = ", G}]}], {12,
12}, Black]], ImageSize -> 150], {0.85, .1}]}, Axes -> None,
PlotPoints -> 45, Boxed -> False, ImageSize -> {375, 375},
SphericalRegion -> True, ViewAngle -> \[Pi]/6],
Style["parameters of the plane", Bold],
Style[Row[{"z = A x + B"}], Bold],
{{A, 11, "A (rotation)"}, -10, 25, 0.5, Appearance -> "Labeled",
ImageSize -> Tiny},
{{B, 12, "B (translation)"}, -20, 50, .01, Appearance -> "Labeled",
ImageSize -> Tiny},
Style["\nparameters of the surface", Bold],
Style["z = \!\(\*SuperscriptBox[\"x\", \"2\"]\)-a \
\!\(\*SuperscriptBox[\"y\", \"2\"]\)+b x \!\(\*SuperscriptBox[\"y\", \
\"2\"]\) + c \!\(\*SuperscriptBox[\"x\", \"2\"]\) y", Bold],
{{a, -1, "a"}, -2, 2, 0.01, Appearance -> "Labeled",
ImageSize -> Tiny},
{{b, 0, "b"}, -2, 2, 0.05, Appearance -> "Labeled",
ImageSize -> Tiny},
{{c, 0, "c"}, -5, 5, 0.2, Appearance -> "Labeled", ImageSize -> Tiny},
Delimiter, TrackedSymbols -> Manipulate, ControlPlacement -> Left,
SynchronousUpdating -> False]

http://demonstrations.wolfram.com/RealEllipticCurves/