Sine Wave Generator

user_avatar Made by: DomiNation

PROJECT DESCRIPTION

Share this project:

Here is a random little project! :)
This is a 3Dish sine wave generator. Hopefully it is easy to use. Enjoy!

*keep in mind that the lines connecting the points are straight. In a real graph, they should be curved. This is why you can sometimes get extremely jagged edges but it works fine for the more smooth functions.

VERSION 1.2

Last Updated: September 21, 2022

+ Added the "Animate" button. It adds renders the model rapidly, adding to the x values for every frame
*Tell me if the animation is too laggy for your device so I can slow it down!

- Made a few UI improvements. x shift is now shown in degrees

COMMENTS

YOU MUST BE SIGNED IN TO LEAVE A COMMENT

October 28, 2018

oh my god! O:

Now this is impressive... It's even 3D! O.O

October 30, 2018

Ikr it's even animated 0

March 11, 2017

It looks so cool, just too bad that it doesn't run at 60 FPS 😕

March 10, 2017

I was just thinking today to purchase a college textboook and reviewing it to see if things like this are possible in hyperPad. Awesome work!

March 09, 2017

I have started work with making it so you can input a function. The animate button will be replaced with the variable 't' for time in the function :)

March 08, 2017

Should I add up and down rotation? I experimented with it but it was very buggy :(

March 08, 2017

Super cool!

March 08, 2017

It's pretty cool. One thing I've noticed is that it's really slow, can't you run them all at once with a loop? Also, it seems options for resolution of the grid would be cool.

March 08, 2017

There is a 0.01 wait inside the loop so it take ~3 seconds for something to render counting in lag. Without the wait, it took about the same amount of time, which is why I opted to just make it more visually appealing by having the slight delay instead of having the app freeze for a few seconds. Anyway, I plan on making a way to animate the function. It will render each frame (adding to the x for each frame) and save all the y positions for the points in dictionaries. Then it will be able to rapidly play the animation. This way, you will have to wait a long time for it to render all the frames but it should be smooth when playing the animation.

I tested with a 32 x 32 point plane yesterday but the lag made it unusable.

March 08, 2017

Someone is probably going to ask this so I'm just going to answer it:

What does "x shift" do?

x shift slides the function on the x axis. You can move the function left or right, moving the waves.

The plane is split into layers (1 layer for every z coordinate). The z axis is the depth. You can see the individual z layers when you render a function. The second value of x shift is the most important. It will move the function in increasing amounts for each z layer, allowing you to "rotate" the wave so it is diagonal. Every time the program starts to render a new z layer, it moves the function on the x axis by the amount for that individual z layer using the second input of x shift.

So if the second input for x shift is "3," the function on the fist z layer will be moved 3 units to the right. The second z layer will be 6 units over, the third 9 over, and so on.

Also, the function used in this isn't a proper mathematic function for sine waves. I just threw in a few variables to get it working so I could work on getting the model to render. Now that it works, I will probably create some sort of text input that allows you to see ANY function in 3D. It should also work with functions that are meant to be 3D.

March 08, 2017

If you get any user input function rendering in hyperpad that'd be amazing. I can see it being possible but really hard. I'm guessing it would be limited in some ways like logarithms, complex numbers, and non-square roots, although you could technically calculate these...