<commit_before>#ifndef LUAGLWIDGET_H
#define LUAGLWIDGET_H

#include <QVector3D>

#include "GLWidget.h"
#include "Lua.hpp"

using namespace std;

class LuaGLWidget : public GLWidget
{
	Q_OBJECT

	// Proportional to the total amount of vertices rendered.
	static const int HALFSIZE=250;

	// The vertical scaling applied to each vertex. Higher
	// values mean higher peaks and lower troughs.
	static const int AMPLITUDE=2;

	unsigned int sceneList;

	float heights[HALFSIZE*2][HALFSIZE*2];
public:
	LuaGLWidget(QWidget* const parent = 0);

	template <typename T>
	void update(T func)
	{
		// The amount of compression between values. Higher values
		// cause a wider range of values to be shown.
		static const float FREQUENCY=.3;

		for (int y = -HALFSIZE; y < HALFSIZE; y++) {
			for (int x = -HALFSIZE; x < HALFSIZE; x++) {
				set(x, y, func(FREQUENCY*x, FREQUENCY*y));
			}
		}
	}
<commit_msg>Reduce vertices for Lua demo<commit_after>#ifndef LUAGLWIDGET_H
#define LUAGLWIDGET_H

#include <QVector3D>

#include "GLWidget.h"
#include "Lua.hpp"

using namespace std;

class LuaGLWidget : public GLWidget
{
	Q_OBJECT

	// Proportional to the total amount of vertices rendered.
	static const int HALFSIZE=100;

	// The vertical scaling applied to each vertex. Higher
	// values mean higher peaks and lower troughs.
	static const int AMPLITUDE=2;

	unsigned int sceneList;

	float heights[HALFSIZE*2][HALFSIZE*2];
public:
	LuaGLWidget(QWidget* const parent = 0);

	template <typename T>
	void update(T func)
	{
		// The amount of compression between values. Higher values
		// cause a wider range of values to be shown.
		static const float FREQUENCY=.3;

		for (int y = -HALFSIZE; y < HALFSIZE; y++) {
			for (int x = -HALFSIZE; x < HALFSIZE; x++) {
				set(x, y, func(FREQUENCY*x, FREQUENCY*y));
			}
		}
	}

{'fraction_non_alphanumeric': 0.10281923714759536, 'fraction_numerical': 0.009950248756218905, 'mean_word_length': 3.8266666666666667, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1410130', 'n_tokens_mistral': 701, 'n_tokens_neox': 642, 'n_words': 212}