Articles tagged (
math
)




A List of Weird Plotted Equations on Desmos
Published 28 Apr 2021

Sometimes the calculator detects that an equation is too complicated to plot perfectly in a reasonable amount of time. When this happens, the equation is plotted at lower resolution. The result can be quite intriguing

0d624b17c2309795f2bf8c8ec93bf403.jpg


Trigonometric Expressions


sin(xy)=cos(xy)

f0d694a51c590eacf1a8d66272b43267.png


sin(x)^y = x siny

6522205674ae0f8c3fdefc5713b9000c.png


\cos(x)+\sin(x*y)=\cos(y*x)+\sin(y)

64dcb742a1ff88b2d189d2d755a9711a.png


\sin y=\cos x

58576f6ac185526396d113f38a938903.png


Algebraic Equations


x!!=y!!

a7992e6b8e9dcc933fb07fb748e032af.png


\log_{x}(y)=1/(\log_{y}(x))

0aab41dcf1a098b000fa58583d7646fc.png

336 views


First Article
Published 27 Jul 2021

#define _USE_MATH_DEFINES
#include <math.h>
#include <iostream>
#include <iomanip>

/**
 * Estimate PI using Leibiniz series
 * 1 - (1/3) + (1/5) - (1/7) + (1/9) .... = (pi / 4)
 */

void calc(int terms) {
    long double pi = M_PI;

    long double sum = 0;
    long long int denom = 1;

    for(int i = 0; i < terms; i++) {
        sum += pow(-1, i) * ( 1 / double(denom) );
        denom += 2;
        long double estimate = sum * 4;
        long double diff = abs(pi - estimate);
        std::cout ...
67 views


Plotting an Arrow using C++
Published 23 Aug 2021

Using FLTK graphics library to draw an arrow.

ebm8tnyxdmf3lfptrnjl.png


Aim - Create a C++ program to draw an arrow:

  • between 2 given coordinates
  • arms of length as a given ratio to its body length
  • arms at specified incline to the body


kicomvydi7rataondhm2.png


Given:

  • Start point of arrow as (x1, y1) and end point (x2, y2). Eg: (2, 3) and (10, 100)
  • Ratio provided = x : y. Eg 1:10
  • Incline of arrow arms (in degrees) = θ. Eg: θ=67


Attempt 1


Attempt 1 relies on individually calculating the slope of all 3 lines and finding points of the arrow by combining equations of distance formula, tangent slope for...

66 views


STL-List-Implementation
Published 12 Jun 2023

STL List Implementation

Basic Performance Tests


$ ./a.exe 500000
std::list: 5359224 ms
list: 5368370 ms
$ ./a.exe 200000
std::list: 536497 ms
list: 487405 ms


umnro5nzdsrjtkew9bfq.png


48 views