top of page
  • GitHub
  • LinkedIn
Wiskunde Notebook en rekenmachine

Math Projects

Features

01.

General Information

02.

My experience

03.

My contribution

General information

Teamsize: 1
Platform: unity & C#
Genre:not applicable

My experience

These projects were part of the requirements to pass my math class in my third year. I had to complete them to demonstrate my understanding of various mathematical concepts and show how I could apply them in practical situations. The projects involved working with different math techniques, as well as integrating smaller subjects that helped to support my learning and problem-solving skills.

My Contribution

I completed everything with the help of various resources, including Unity documentation, YouTube tutorials, and ChatGPT. The Unity docs provided me with detailed instructions and examples, while YouTube videos helped clarify concepts and offered step-by-step guidance. Additionally, ChatGPT was a valuable tool for answering specific questions and assisting with problem-solving throughout the project. These resources allowed me to efficiently work through challenges and successfully complete the projects.

Pythagoras theorem

I created a method in Unity to generate a triangle and calculate the length of side C using only the values of sides A and B. This approach ensures that the triangle is formed correctly, and the calculation follows the Pythagorean theorem or another relevant formula, depending on the type of triangle being used. Let me know if you’d like further details or improvements

Quadratic formula

I created a system in Unity that animates a projectile following a parabolic path, using a quadratic equation with adjustable parameters. The movement is controlled by three sliders that allow real-time modifications of the equation's coefficients (a, b, and c), directly influencing the shape of the trajectory. The projectile smoothly moves along the parabola from a starting position to an endpoint before resetting and looping the motion. Additionally, the equation is displayed dynamically in the UI to reflect the current values. This setup provides an interactive way to visualize and experiment with quadratic motion.

Solving equations and inequalities

I developed a Unity system that moves an object within a bounded area while dynamically adjusting its direction upon collision with the edges. The object's movement is initialized with a random direction and maintains a constant speed. When it reaches the predefined boundaries, it bounces off by inverting its velocity components. Additionally, a LineRenderer is used to visualize the object's trajectory over time, gradually creating a path that represents its movement pattern. This setup provides an efficient way to simulate continuous, constrained motion within a defined space.

Working with fractions

I created a fraction addition game in Unity that challenges players to solve random fraction problems. The game generates two fractions, calculates their sum, and simplifies the result. Players must select the correct answer from multiple options presented as interactive buttons.

The UI, built with TextMeshPro, dynamically updates to display the current problem, the player's score, and remaining lives. Each turn presents a new problem, and the game continues until the player runs out of lives. A 'Game Over' message appears when all lives are lost, and players can restart the game by pressing the 'R' key.

This project combines fraction calculation, randomization, and interactive game elements to create a fun and educational experience

Trigonometric functions

I created a Unity script that generates a dynamic wave effect using a series of spheres. The script instantiates a specified number of spheres along the x-axis and animates their movement using sinusoidal functions.

Each sphere’s position is updated in real time to create a wave-like motion along the y and z axes. The movement is determined by a combination of time and each sphere's index, ensuring that the wave effect has a smooth phase offset. The animation continuously updates over time, creating a dynamic and visually appealing pattern.

This script demonstrates the use of sinusoidal functions for motion and provides an engaging way to visualize wave behavior in Unity

I created a Unity script to simulate circular motion for an object. The object moves along a circular path in 2D space, with its position calculated using trigonometric functions.

The script uses Mathf.Cos and Mathf.Sin to determine the x and y coordinates based on the current time, speed, and the specified radius. These values update continuously in the Update method, allowing the object to follow a smooth circular trajectory.

This simple and efficient implementation demonstrates the use of trigonometry for creating rotational or circular movement in Unity, making it ideal for animations or dynamic gameplay elements.

I created a Unity script to visualize the Cosine Rule by dynamically calculating angles within a triangle based on the positions of its vertices. The triangle is drawn using LineRenderer components, ensuring that its edges update in real time as the vertices move.

The script determines the angles using vector mathematics and the Cosine Rule formula, which relates the lengths of the sides to the angles between them. It continuously checks for position changes in the Update method and recalculates the angles accordingly, ensuring accurate real-time updates.

This implementation provides an efficient way to explore triangle geometry interactively, making it useful for educational purposes, visualization of trigonometric principles, or dynamic shape manipulation in Unity.

Power and Roots

This Unity script allows users to perform power and square root calculations through TMP_InputField inputs. The user can enter a base number and an exponent (for calculating power) or a value (for calculating the square root) in the provided input fields.

The CalculatePower() method computes the result of raising the base number to the given exponent using Mathf.Pow, and displays the result in a TextMeshProUGUI field. Similarly, the CalculateRoot() method calculates the square root of the given value using Mathf.Sqrt and displays the result, with an exception for zero, which prompts an error message.

The script handles input validation, ensuring that only valid numbers are processed. If the input is invalid, it provides feedback to the user, prompting them to enter correct values.

wortel en machts functies.png

© 2035 By Owen, C# Gamedeveloper.

bottom of page