Part.Position = position + Vector3.new(0,radius*math.sin(currentTime),0) Game:GetService("RunService").Stepped:Connect(function(currentTime) We can do that easily using sine: local part = script.Parent Let’s say we want to move a part up and down, back and forth smoothly. Some of my favorite practical uses of these functions are to model oscillations, or a number going back and forth between two different values. If you dont know how to interpret these graphs, you can image the x-axis as the value you put into the function and the y-value as what you would get back, so for example, the sine graph visualizes the possible results of: local y = math.sin(x) Trigonometry itself centers around the use of them, and they are very important functions in math.Īs for practical uses for the functions themselves, it helps to look visually at graphs of them. In short, they are mainly used to describe the relation between the length of the sides of a right triangle and the angle between the hypotenuse (the longest side of the right triangle) and it’s adjacent side (the other side of the triangle next to the angle). Sine, cosine, tangent, arcosine, arcsine, and arctangent are all trigonemtric functions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |