## Arc Length by Simpson’s Rule

C++. I applied Simpson’s rule to the integral in the Arc length formula to get an approximate length of a quadratic equation curve. To do that, I applied Simpson rule by sweeping small increments on […]

C++. I applied Simpson’s rule to the integral in the Arc length formula to get an approximate length of a quadratic equation curve. To do that, I applied Simpson rule by sweeping small increments on […]

C++. This is for symmetrical distribution of points in each latitude on a sphere. As an input, different number of points for each latitude can be assigned. Top and bottom coordinates, of course, are the […]

C++. I developed an algorithm based on “three penny algorithm” to find the top cut of a convex hull for dense circle shaped data. It takes the most left point as an entry point like Jarvis’s […]

C++. This is a question from Codility. Question: A non-empty zero-indexed array A consisting of N integers is given. A pit in this array is any triplet of integers (P, Q, R) such that: 0 ≤ P < […]

C++. I wrote this audio engine with FMOD API. Its play state algorithm in the interactive music class is an open nested loop system in which its update function is continuously called. It uses two […]

C++. If needed to play audio files from resource in Visual Studio (not to directly provide audio files), process would be a little bit different. When upload files to resource, firstly you create .rc file, […]

C++. This is the problem 69 from Project Euler. Question: Euler’s Totient function, φ(n) [sometimes called the phi function], is used to determine the number of numbers less than n which are relatively prime to […]

C++. This is the problem 66 from Project Euler. Question: Consider quadratic Diophantine equations of the form: x2 – Dy2 = 1 For example, when D=13, the minimal solution in x is 6492 – 13×1802 = 1. It can be assumed that there […]

C++. This is the problem 44 from Project Euler. Question: Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers are: 1, 5, 12, 22, 35, 51, 70, 92, 117, 145, … It […]