Skip to content

Instantly share code, notes, and snippets.

View louismeunier's full-sized avatar

Louis Meunier louismeunier

View GitHub Profile
Manipulate[
Show[
{
ParametricPlot3D[
{Sin[u], Cos[u], v},
{u, 0, 2 Pi},
{v, -2, 2},
PerformanceGoal -> "Quality"
],
ParametricPlot3D[
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Wolfram 14.3' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Wolfram 14.3' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
% henon map plotter
% initial condition
x1=0;
y1=0;
% parameters
a=1.4;
b=0.3;
% diversity in math logo made in mathematica!
% just a mobius strip with fancy colors...
x[r_, \[Theta]_] := (1 + r/2 Cos[\[Theta]/2]) Cos[\[Theta]]
y[r_, \[Theta]_] := (1 + r/2 Cos[\[Theta]/2]) Sin[\[Theta]]
z[r_, \[Theta]_] := (r/2 Sin[\[Theta]/2])
ParametricPlot3D[
{
x[r, \[Theta]],
-y[r, \[Theta]],
% interactive normal distribution plot, playing around with manipulate function
Manipulate[
Show[
Plot[
PDF[NormalDistribution[\[Mu], \[Sigma]], x],
{x, -10, 10},
AxesOrigin -> {0, 0},
PlotRange -> {-0.1, 0.5},
PlotLabel ->
"\[ScriptCapitalN](" <> ToString[\[Mu]] <> "," <>
(* Mathematica *)
Plot[
Piecewise[{{1 x, 1.5 > x > 0}}, {{0, x > 1.5}}],
{x, 0, 4},
TicksStyle -> Directive[Opacity[0]],
PlotStyle -> Red,
PlotRange -> {{0, 4}, {0, 5}},
Epilog -> {
Opacity[0.25], Gray,
Polygon[{{1.5, 1.5}, {2.5, 2.25}, {3, 5}, {2, 4.25}}],
# Julia
begin
using Plots; plotly()
# radius of the sphere
r = 2
# point to find the tangent at
x_0 = 1
y_0 = 1
# working with square roots is a little finicky...
# Julia
begin
using Plots;
plotly()
transparent_red = RGBA(200/255,60/255,60/255,200/255)
transparent_gray = RGBA(30/255,30/255,30/255,230/255)
abc(x,y) = 4x^2+4x*y+y^2+2x+5y+3
begin
using Plots, LaTeXStrings; pyplot()
# initial condition
x_0 = 8
y_0 = -2
# the "concentration of blood" on the surface of the water
C(x,y) = ℯ^(-(x^2+2y^2)/(10^4))
x_range = -10:0.1:10
y_range = -10:0.1:10
C_range = [C(x,y) for x in x_range, y in y_range]