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

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

Attach their codes, too.

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)

*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'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

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}*/
```

'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'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

Mathematica Code:

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

'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'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,227

by xslittlegrass.

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

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)[]
}
```

by DackAttack

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 92,227

Contributed by: Karl Scherer

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

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]]
```

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

Thanks

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

Pages: **1**