Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaussian Wave Properties Cannot be Adjusted [Will's Branch: modalUI] #24

Open
kylemas opened this issue Oct 17, 2019 · 2 comments
Open
Assignees
Labels
bug Something isn't working urgent Urgent feature or bug

Comments

@kylemas
Copy link
Contributor

kylemas commented Oct 17, 2019

  • There seems to be a bug with the modal menu.
  • Gaussian wave properties cannot be adjusted through the sliders on the menu.
@kylemas kylemas added the bug Something isn't working label Oct 17, 2019
@willjvan
Copy link
Contributor

willjvan commented Oct 31, 2019

The reason the Gaussian wavelength cannot be adjusted is because of the following code found in the ProceduralGrid2 script:

        if (play)
        {
            // loops through the list of functions
            if (funcVR < 6)
            {
                sec += speedOfWave;
                // set vertex offset - because we don't have a permanent size
                for (int v = 0; v < gridSize * gridSize; v++)
                {
                    // here the wavelength is used to calculate the vertices y coordinate
                    vertices[v].y = amplitude * f(vertices[v].x / wavelength, vertices[v].z / wavelength, frequency * sec);
                }
            }
            else
                for (int v = 0; v < gridSize * gridSize; v++)
                    // here wavelength is not used
                    vertices[v].y = amplitude * yVals[yPresent, v];

            zeroFDedges();  // Let's kill off the edges, to give a hard reflecting boundary for the waves
            oneFDstep();
        }

All the waves with funcVR < 6, which are all the waves except for Gaussian, have their vertices calculated using the wavelength variable. However, for some reason the Guassian vertices cannot be calculated using the wavelength variable. Will look into this!

@kylemas kylemas pinned this issue Oct 31, 2019
@kylemas kylemas added the urgent Urgent feature or bug label Oct 31, 2019
@kylemas kylemas unpinned this issue Nov 6, 2019
@willjvan
Copy link
Contributor

willjvan commented Nov 8, 2019

The cause of this was that in the ProceduralGrid2 script's update function we have the following code:

            if (funcVR == 5)
            {
                makeGrid();
            }

if we add && play to the conditional then the mexican hat wave doesnt change

            if (funcVR == 5 && play)
            {
                makeGrid();
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent Urgent feature or bug
Projects
None yet
Development

No branches or pull requests

2 participants