Skip to main content

Questions tagged [trigonometry]

For challenges where trigonometry plays an important role.

24 votes
29 answers
10k views

The goal of this code golf is to draw a regular polygon (one with equal side lengths) given the number of sides and radius (distance from center to vertex). The number of sides and the radius can be ...
Taconut's user avatar
  • 923
17 votes
3 answers
667 views

Given the number of vertices n ≥ 3 and the "step size" 1 ≤ m < n/2 (indicating the distance between two connected vertices), ...
Martin Ender's user avatar
6 votes
2 answers
709 views

Your goal is to map a piece of text to a sine curve of the form: a sin ( mx - b ) Where a and m are non-zero rational numbers, b is a rational number, and the calculations are in radians. It doesn't ...
geokavel's user avatar
  • 6,716
47 votes
52 answers
10k views

This is a graphical output challenge where the task is to give the shortest code per language. Task Your code should plot a single purple pixel (hex value #800080 or rgb(128, 0, 128)), moving ...
user avatar
36 votes
22 answers
6k views

Challenge Given an input of an integer, \$n\$ (where \$0<n<50\$), output the graph of \$y=\mathrm{Re}((-n)^x)\$ from \$x = -3\$ to \$x = 3\$ inclusive. Where \$\mathrm{Re}(p)\$ is the real part ...
Beta Decay's user avatar
  • 23.7k
25 votes
14 answers
3k views

Given (in any structure; flat list, two lists of lists, a tuple of matrices, a 3D array, complex numbers,…) the coordinates for two non-degenerate triangles ...
Adám's user avatar
  • 31.9k
14 votes
21 answers
3k views

Given latitude/longitude of two points on the Moon (lat1, lon1) and (lat2, lon2), compute the distance between the two points in ...
mdahmoune's user avatar
  • 3,062
10 votes
3 answers
2k views

Thank you guys so much for your help with calculus. Now I need some help with my upcoming trigonometry test. On the test, I'll need to simplify expressions. I’ll be given input like ...
Ypnypn's user avatar
  • 10.9k
4 votes
8 answers
725 views

Implement the Discrete Cosine Transform (DCT). This may implemented as either a function or a program and the sequence can be given as either an argument or using standard input. Your program must be ...
user avatar