Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What effects does multiplication,division (etc...) have on math.sin,math.cos and math.tan?

Asked by 8 years ago

What effects does multiplication,division (etc...) have on math.sin,math.cos and math.tan? May you please give me a list of effects on how these operators work on these trig functions.

**For example: **

print("Tehgeek's weird sinewave loaded...")
n = 0
spd = workspace.SpeedSine
tab = {}
position = workspace.SineStart.Position
xx = position.x
yy = position.y+10
zz = position.z

for i = 1, 20 do
p = Instance.new("Part")
p.Name = "BRICKSINE"
p.Size = Vector3.new(1,1,1)
p.Anchored = true
p.Parent = workspace
table.insert(tab,p)
end

while wait(0.1) do
if spd.Value ~= 0 then
n = n+1
div = n/spd.Value
for i = 1, 20 do
v = Vector3.new(xx,math.sin((i/2))*5+div+yy,i*2+zz)
tab[i].CFrame = CFrame.new(v)*CFrame.Angles(math.sin(i), 0, 0)
end
end
end

The last sections with the variable v confused me with the y slot where it has ... math.sin((i/2))*5+div

This part confuses me with the math? May someone give a thorough explanation. Also- Funyun - your explanations confuse me alot. Last thing can someone explain the div variable and how speed even works out with this variable - > div = n/spd.Value

0
I'm sorry Blockeus, but the whole script seems hard to follow. I haven't learned precalc like DigitalVeer suggested. funyun 958 — 8y

2 answers

Log in to vote
2
Answered by 8 years ago

Your question is more of a pre-calculus question. You can take a look at links to find out what certain things are, such as amplitude and a vertical shift.

Graphing Trig Functions:http://www.purplemath.com/modules/grphtrig.htm

Video Demonstration:https://www.khanacademy.org/math/trigonometry/trig-function-graphs/trig_graphs_tutorial/v/we-amplitude-and-period


Perhaps it's even a better idea to understand what tan, cos, and sin are. They are highly important functions that basically set the base for all trigonometry. They coordinate with how angles of triangles function with most of time, circles.

Video Explanation: https://www.khanacademy.org/math/trigonometry/basic-trigonometry/cc-trig-ratios-similarity/v/similarity-to-define-sine-cosine-and-tangent

0
Lines 24 and 25 seem to combine linear functions with trigonometric functions, like f(x) = sin(x)+2x. It's weird. funyun 958 — 8y
Ad
Log in to vote
0
Answered by
funyun 958 Moderation Voter
8 years ago

1) Pull out a graphing calculator. Make sure it's on radian mode.

2) Graph y = x. It's a diagonal line going up.

3) Graph y = sin(x). It's a wave.

4) Graph y = sin(x) + x. It's a diagonal wave going up.

Get it?

Answer this question