Algebraic surfaces: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>Mindraker No edit summary |
No edit summary |
||
(45 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Buried|reason=Now this is something!}} | |||
== Introduction == | == Introduction == | ||
This page covers another way of writing out the formulas necessary to create graphs than covered on the [[Parametric equations]] page. It may seem unnecessarily complicated at times, but [http://homepage.univie.ac.at/herwig.hauser/bildergalerie/gallery.html as you can see], this method can provide quite complex shapes and designs. | This page covers another way of writing out the formulas necessary to create graphs than covered on the [[Parametric equations]] page. It may seem unnecessarily complicated at times, but [http://homepage.univie.ac.at/herwig.hauser/bildergalerie/gallery.html as you can see], this method can provide quite complex shapes and designs. | ||
== Heart == | |||
[[Image:Heart.PNG|thumb|Süss/Heart]] | |||
<pre> | |||
for x = -14,14, .25 do | |||
for y = -14,14, .25 do | |||
for z = -14,14, .25 do | |||
if (math.floor(x^2)+math.floor((9/4)* y^2)+math.floor(z^2)-1)^3 - math.floor(x^2*z^3)-math.floor((9/80)*y^2*z^3)==0 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*1.5, z*1.5, y*1.5)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | |||
== Spindel == | == Spindel == | ||
Line 104: | Line 133: | ||
end | end | ||
end | end | ||
</pre> | |||
== Sattel/Saddle == | |||
[[Image:Algebraic5.PNG|thumb|Sattel/Saddle]] | |||
<pre> | |||
for x = -300,300, 1 do | |||
for y = -300,300, 1 do | |||
for z = -300,300, 1 do | |||
if x^2+y^2*z+z^3==0 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*.1, z*.1, y*.1)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | |||
== UFO == | |||
[[Image:Algebraic6.PNG|thumb|UFO]] | |||
<pre> | |||
for x = -10,10, .25 do | |||
for y = -10,10, .25 do | |||
for z = -10,10, .25 do | |||
if (z^2-x^2-y^2-1)==0 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*7, z*7, y*7)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | |||
== Trichter == | |||
[[Image:Algebraic7.PNG|thumb|Trichter]] | |||
<pre> | |||
for x = -10,10, .25 do | |||
for y = -10,10, .25 do | |||
for z = -10,10, .25 do | |||
if x^2+z^3==y^2*z^2 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*4, z*4, y*4)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | |||
== Sphäre/Sphere == | |||
[[Image:Algebraic8.PNG|thumb|Sphäre/Sphere]] | |||
<pre> | |||
for x = -14,14, .25 do | |||
for y = -14,14, .25 do | |||
for z = -14,14, .25 do | |||
if math.floor(x^2)+math.floor(y^2)+math.floor(z^2)==25 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*1.5, y*1.5, z*1.5)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | |||
== Fanfare/horn == | |||
[[Image:Algebraic9.PNG|thumb|horn]] | |||
<pre> | |||
for x = -14,14, .25 do | |||
for y = -14,14, .25 do | |||
for z = -14,14, .25 do | |||
if math.floor(-x^3)+math.floor(z^2)+math.floor(y^2)==0 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*7.5, y*1, z*1)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | |||
== No title == | |||
[[Image:Algebrai10.PNG|thumb|untitled]] | |||
<pre> | |||
for x = -14,14, .25 do | |||
for y = -14,14, .25 do | |||
for z = -14,14, .25 do | |||
if math.floor(x^2)+math.floor(y^2)+math.floor(z^2)==math.floor(z^4) then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*1, z*1, y*1)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end </pre> | |||
== Whitney == | |||
[[Image:Whitney.PNG|thumb|Whitney]] | |||
<pre> | |||
for x = -10,10, .25 do | |||
for y = -10,10, .25 do | |||
for z = -10,10, .25 do | |||
if math.floor(x^2)-math.floor(y^2*z)==0 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*5, z*5, y*5)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end </pre> | |||
== Bell == | |||
[[Image:Bell.PNG|thumb|Bell]] | |||
<pre> | |||
for x = -14,14, .25 do | |||
for y = -14,14, .25 do | |||
for z = -14,14, .25 do | |||
if math.floor(x^2)+math.floor(y^2)+math.floor(z^3)==math.floor(z^2) then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*1, z*2, y*1)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | |||
== Egg == | |||
[[Image:Eggalgebr.PNG|thumb|Dattel/Egg]] | |||
<pre> | |||
for x = -14,14, .25 do | |||
for y = -14,14, .25 do | |||
for z = -14,14, .25 do | |||
if math.floor(3*x^2)+math.floor(3*y^2)+math.floor(z^2)==10 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*5, z*5, y*5)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | |||
== "Plop" == | |||
[[Image:Plop.PNG|thumb|Tunnel]] | |||
<pre> | |||
for x = -10,10, .25 do | |||
for y = -10,10, .25 do | |||
for z = -10,10, .25 do | |||
if math.floor(x^2) + math.floor(z+y^2)^3 == 0 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x, z, y)) | |||
p.Size = Vector3.new(4,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | |||
== Distel == | |||
[[Image:Distel.PNG|thumb|Distel]] | |||
<pre> | |||
for x = -10,10, .25 do | |||
for y = -10,10, .25 do | |||
for z = -10,10, .25 do | |||
if math.floor(x^2)+math.floor(y^2)+math.floor(z^2)+math.floor(1000*(x^2+y^2)*(x^2+z^2)*(y^2+z^2))==1 then | |||
p = Instance.new("Part") | |||
p.formFactor = "Symmetric" | |||
p.CFrame = CFrame.new(Vector3.new(x*3, y*3, z*3)) | |||
p.Size = Vector3.new(1,1,1) | |||
p.Anchored = true | |||
p.BottomSurface = "Smooth" | |||
p.TopSurface = "Smooth" | |||
p.Parent = game.Workspace | |||
p.BrickColor = BrickColor.new(26) | |||
end | |||
end | |||
end | |||
end | |||
</pre> | </pre> | ||
Latest revision as of 06:09, 30 October 2023
Introduction
This page covers another way of writing out the formulas necessary to create graphs than covered on the Parametric equations page. It may seem unnecessarily complicated at times, but as you can see, this method can provide quite complex shapes and designs.
Heart
for x = -14,14, .25 do for y = -14,14, .25 do for z = -14,14, .25 do if (math.floor(x^2)+math.floor((9/4)* y^2)+math.floor(z^2)-1)^3 - math.floor(x^2*z^3)-math.floor((9/80)*y^2*z^3)==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*1.5, z*1.5, y*1.5)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Spindel
for x = -100,100, 1 do for y = -100,100, 1 do for z = -100,100, 1 do if (x^2)+(y^2)-(z^2)==1 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x/10, y/10, z/10)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Kreuz
for x = -10,10, 1 do for y = -10,10, 1 do for z = -10,10, 1 do if x*y*z==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x, y, z)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Gupf
for x = -100,100, 1 do for y = -100,100, 1 do for z = -100,100, 1 do if x^2+y^2+z==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x, z, y)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Diabolo
for x = -100,100, 1 do for y = -100,100, 1 do for z = -100,100, 1 do if x^2==(y^2+z^2)^2 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*1, z*1, y*1)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Sattel/Saddle
for x = -300,300, 1 do for y = -300,300, 1 do for z = -300,300, 1 do if x^2+y^2*z+z^3==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*.1, z*.1, y*.1)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
UFO
for x = -10,10, .25 do for y = -10,10, .25 do for z = -10,10, .25 do if (z^2-x^2-y^2-1)==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*7, z*7, y*7)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Trichter
for x = -10,10, .25 do for y = -10,10, .25 do for z = -10,10, .25 do if x^2+z^3==y^2*z^2 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*4, z*4, y*4)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Sphäre/Sphere
for x = -14,14, .25 do for y = -14,14, .25 do for z = -14,14, .25 do if math.floor(x^2)+math.floor(y^2)+math.floor(z^2)==25 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*1.5, y*1.5, z*1.5)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Fanfare/horn
for x = -14,14, .25 do for y = -14,14, .25 do for z = -14,14, .25 do if math.floor(-x^3)+math.floor(z^2)+math.floor(y^2)==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*7.5, y*1, z*1)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
No title
for x = -14,14, .25 do for y = -14,14, .25 do for z = -14,14, .25 do if math.floor(x^2)+math.floor(y^2)+math.floor(z^2)==math.floor(z^4) then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*1, z*1, y*1)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Whitney
for x = -10,10, .25 do for y = -10,10, .25 do for z = -10,10, .25 do if math.floor(x^2)-math.floor(y^2*z)==0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*5, z*5, y*5)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Bell
for x = -14,14, .25 do for y = -14,14, .25 do for z = -14,14, .25 do if math.floor(x^2)+math.floor(y^2)+math.floor(z^3)==math.floor(z^2) then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*1, z*2, y*1)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Egg
for x = -14,14, .25 do for y = -14,14, .25 do for z = -14,14, .25 do if math.floor(3*x^2)+math.floor(3*y^2)+math.floor(z^2)==10 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*5, z*5, y*5)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
"Plop"
for x = -10,10, .25 do for y = -10,10, .25 do for z = -10,10, .25 do if math.floor(x^2) + math.floor(z+y^2)^3 == 0 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x, z, y)) p.Size = Vector3.new(4,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end
Distel
for x = -10,10, .25 do for y = -10,10, .25 do for z = -10,10, .25 do if math.floor(x^2)+math.floor(y^2)+math.floor(z^2)+math.floor(1000*(x^2+y^2)*(x^2+z^2)*(y^2+z^2))==1 then p = Instance.new("Part") p.formFactor = "Symmetric" p.CFrame = CFrame.new(Vector3.new(x*3, y*3, z*3)) p.Size = Vector3.new(1,1,1) p.Anchored = true p.BottomSurface = "Smooth" p.TopSurface = "Smooth" p.Parent = game.Workspace p.BrickColor = BrickColor.new(26) end end end end