Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2014-06-07 17:29:58

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Post Beautiful Plots

Attach their codes, too.

sagelogo.png Code:

def f(z):

    x = real(z)

    y = imaginary(z)

    return (x^2 + y^2 -1)^3 - x^2*y^3

complex_plot(lambda z: (1/f(z)*i^(z+1)),(-1.5,1.5),(-1.5,1.5),plot_points=300)

(The code takes a lot of time to run, for testing purposes run with plot_points=50)

kAizzX7.png

Last edited by Agnishom (2014-06-07 17:33:31)


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#2 2014-06-07 18:12:50

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Post Beautiful Plots

I've lost the exact code for this but it is somewhat like this:

POV-Ray Code:

	

    #declare e = 2.71828;
    #include "textures.inc"
    #include "colors.inc"
    #include "glass.inc"
    camera {
    location <0, 0, -10>
    look_at <0,0,0>
    }
    light_source
    {
    <0,0,-10>
    color rgb <1.0, 1.0, 1.0>
    shadowless
    spotlight
    rotate y*clock*-100
    }
    #declare Ball =
      sphere{<0,0,0>,0.08
        texture{
          pigment{color rgb<1,0.8,0>}
          finish {diffuse 0.9 phong 1}
        }// end of texture
      }// end of sphere
     
    //------------------------------------
    #declare X = -5;    // start value X
    #declare EndX = 5;  //   end value X
    #declare Step = 0.001;// step value
    #declare Sine =
    union{
    #while ( X < EndX + Step)//loop start
      object{ Ball translate <X,sin(X),0>}
     
    #declare X = X + Step; // next X
    #end // ------------------- loop end
    };
    #declare X = -5;    // start value X
    #declare EndX = 5;  //   end value X
    #declare Step = 0.001;// step value
    #declare Curvedd =
    union{
    #while ( X < EndX + Step)//loop start
      object{ Ball pigment {color rgb<0,0,1>} translate <X,cos(X)+cos(pow(X,2)),0>}
     
    #declare X = X + Step; // next X
    #end // ------------------- loop end
    };
     
    #declare X = 0;    // start value X
    #declare EndX = 6.28;  //   end value X
    #declare Step = 0.001;// step value
    #declare Cardioid =
    union{
    #while ( X < EndX + Step)//loop start
      #declare r = 1 - sin(X);
      object{ Ball pigment {color rgb<0,1,0>} translate <r*cos(X),r*sin(X),0>}
     
    #declare X = X + Step; // next X
    #end}; // ------------------- loop end  
     
    #declare X = 0;    // start value X
    #declare EndX = 6.28;  //   end value X
    #declare Step = 0.001;// step value
    #declare Butterfly =
    union{
    #while ( X < EndX + Step)//loop start
      #declare r = pow(e,sin(X)) - 2*cos(4*X) + pow(sin((2*X-pi)/24),5);
      object{ Ball texture{Polished_Brass} translate <r*cos(X),r*sin(X),0>}
     
    #declare X = X + Step; // next X
    #end}; // ------------------- loop end
     
    #declare X = -6.28;    // start value X
    #declare EndX = 6.28*2
    ;  //   end value X
    #declare Step = 0.001;// step value
    #declare log_spiral =
    union{
    #while ( X < EndX + Step)//loop start
      #declare b = log(1.61803397)/(3.14159/2);
      #declare r = 1*pow(e,b*X);
      object{ Ball texture{Gold_Metal} translate <r*cos(X),r*sin(X),0>}
     
    #declare X = X + Step; // next X
    #end}; // ------------------- loop end
     
     
    #declare X = -6.28;    // start value X
    #declare EndX = 6.28
    ;  //   end value X
    #declare Step = 0.001;// step value
    #declare Fermat_spiral =
    union{
    #while ( X < EndX + Step)//loop start
      #declare r = pow(X,0.5);
      object{ Ball texture{Polished_Brass} translate <r*cos(X),r*sin(X),0>}
      #declare r = -1*pow(X,0.5);
      object{ Ball texture{Polished_Brass} translate <r*cos(X),r*sin(X),0>}
    #declare X = X + Step; // next X
    #end}; // ------------------- loop end
     
    object {Butterfly texture{Jade}}
    /*object {Cardioid}
    object {Sine}
    object {Curvedd}
    object {Fermat_spiral} 
    object {log_spiral}*/
     
     
    sphere{ <0,0,0>, 1
            texture{T_Glass3
                   } // end of texture
            interior
            {I_Glass_Fade_Sqr1}
            finish
            {F_Glass1}
            scale 100
          }

Uncomment any of the lines in this portion of the code above as you wish:

object {Butterfly texture{Jade}}
    /*object {Cardioid}
    object {Sine}
    object {Curvedd}
    object {Fermat_spiral} 
    object {log_spiral}*/

395051_298470096924598_1860853671_n.jpg
529427_342652385839702_559753891_n.jpg


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#3 2014-06-07 18:23:48

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Post Beautiful Plots

Mathematica Code:

ContourPlot[
 Evaluate[Re[
   Product[x + I y - (a + I b), {a, -2, 2}, {b, -2, 2}]]], {x, -3, 
  3}, {y, -3, 3}]

O_139.gif


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#4 2014-08-15 21:23:19

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Post Beautiful Plots

LYOnYt6.png
jjfyaIW.png


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#5 2014-08-16 00:50:44

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Post Beautiful Plots

8JCEB9t.gif


by xslittlegrass.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#6 2014-08-16 02:11:13

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Post Beautiful Plots

Context Free Code:

CF::Size = [s 225]
 
startshape leggo
 
shape leggo {
CIRCLE[s 36]
 
loop 180[r 2]
vein[s .6 hue 65..180 sat .3 b .8 x 12 y 12	]
 
loop 206[r 1.75]
myveins[hue 160..250 sat .3 b .7 x -40 y -40] //Comment out
this line for some trippy shizz
 
loop 20 [r 14..20]
yomama[s .8 hue 0 sat .7 b .7 a -.5 x (-71..-68 )y
(-71..-68)]
 
mycircle[]
}
 
shape yomama
rule .99{
CIRCLE[]
yomama[s .995 x -.1...5 y -.1...5 r -10..10]
}
rule .01{
CIRCLE[]
yomama[s .995 x 0...5 y 0 ...5]
yomama[s .6 r -60..60]
}
rule .05{
CIRCLE[]
yomama[s .995 x 0...5 y 0 ...5]
yomama[s .6 r -60..60 a -.8]
}
 
shape myveins{
vein[]
loop 10 [r 18]
vein[s .2 r -85]
}
 
shape vein
rule .99{
CIRCLE[a -.2]
vein[s .99 x 0...5 y 0 ...5]
}
rule .0775{
CIRCLE[a -.2]
vein[s .99 x 0...5 y 0 ...5]
vein[s .6 r -60..60]
}
 
path mycircle{
myrad = 100
 
MOVETO(0,(-myrad))
ARCTO(0,(myrad),myrad)
ARCTO(0,(-myrad),myrad)
STROKE(1)[]
}

full_3434.png
by DackAttack


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#7 2014-08-16 04:58:13

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Post Beautiful Plots

e7C3Ii9.gif

Contributed by: Karl Scherer


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#8 2014-12-31 22:27:34

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Post Beautiful Plots

R2bdsR5.jpg
Happy New Year!

TreeGraph[RandomInteger[#] \[DirectedEdge]  # + 1 & /@ Range[0, 2013],
  VertexSize -> Table[i -> RandomReal[10], {i, 2013}], 
 VertexStyle -> 
  Table[i -> ColorData["CherryTones"] /@ RandomReal[1, 1], {i, 2013}],
  EdgeStyle -> RGBColor[0.3, 1, 0.5], ImageSize -> Full, 
 Background -> Black, GraphLayout -> "RadialEmbedding", 
 EdgeShapeFunction -> 
  GraphElementData[{"HalfFilledArrow", "ArrowSize" -> .005}], 
 PlotLabel -> Style["a tree with 2015 nodes", Gray, 20]]

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#9 2014-12-31 23:28:08

David
Member
From: Bumpkinland
Registered: 2014-04-23
Posts: 3,164

Re: Post Beautiful Plots

Wow, that one looks interesting.
Bravo Agnishom!


His dominion is an everlasting dominion, Which shall not pass away, And His kingdom the one Which shall not be destroyed.

Offline

#10 2014-12-31 23:42:03

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Post Beautiful Plots

Thanks


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

Board footer

Powered by FluxBB