- 32
- 139 127
Edgar Programmator
Приєднався 31 тра 2021
Translating image into formula | Euclid's square root geometric construction
Deriving a square root formula with trigonometric functions.
Переглядів: 67
Відео
Understanding imaginary exponents with logarithms
Переглядів 5602 місяці тому
It's well-known that exponentiation with natural exponents can be interpreted as repeated multiplication. However, does a general interpretation exist for any exponent? In this video, we'll attempt to answer that question.
Complex numbers: vectors wanting to be numbers
Переглядів 2997 місяців тому
Complex numbers: vectors wanting to be numbers
Cubic interpolation between 2D points
Переглядів 5728 місяців тому
Connect the dots smoothly. Source: www.paulinternet.nl/?page=bicubic edgardocpu
The perceptron neuron: the simplest AI
Переглядів 6668 місяців тому
In this video, we'll delve into the world of the perceptron neuron: its origins, its connection to our brains, and even the algorithm used to train it: the well-known perceptron algorithm. Perceptron example (Python): gist.github.com/isedgar/2e1386e88a233389586257d87f78b95e Tic-tac-toe example (Python): gist.github.com/isedgar/02db92ef698b6cdb3314785bf1809124 Tic-tac-toe dataset: gist.github.co...
Solve any equation using gradient descent
Переглядів 55 тис.9 місяців тому
Gradient descent is an optimization algorithm designed to minimize a function. In other words, it estimates where a function outputs its lowest value. This video demonstrates how to use gradient descent to approximate a solution for the unsolvable equation x^5 x = 3. We seek a cubic polynomial approximation (ax^3 bx^2 cx d) to cosine on the interval [0, π]. edgardocpu
A simple algorithm for 2D Voronoi diagrams
Переглядів 7 тис.Рік тому
In this video we will learn a simple algorithm for generating Voronoi diagrams. Given a set of points on the plane, the idea is to create, for each point, a polygon that encloses the region of the plane that is closest to that point. Voronoi diagrams are a type of spatial partitioning diagram that divide a plane into regions based on the distance to a set of points. They are used in a variety o...
Find the Intersection of a Line and an Axis-Aligned Rectangle
Переглядів 791Рік тому
In this video, we'll learn how to find the intersection of a line and an axis-aligned rectangle. This is a common problem in computer graphics and game development. We'll discuss the different ways to solve this problem and implement an efficient algorithm. edgardocpu
How to Tell if a Point Lies on a Line (Segment)
Переглядів 1,3 тис.Рік тому
In this video, I'll show you how to check if a point lies on a line in just 30 seconds. It's so easy, even a beginner can do it! Line: y = mx b Point: (x0, y0) Point is on line if: y0 = mx0 b Line: ax by c = 0 Point: (x0, y0) Point is on line if: ax0 by0 c = 0 Line: (x2 - x1)(y - y1) = (y2 - y1)(x - x1) Point: (x0, y0) Point is on line if: (x2 - x1)(y0 - y1) = (y2 - y1)(x0 - x1) Line segment: A...
Find the Line Passing Through the Middle of Two Points
Переглядів 140Рік тому
In this video, I will show you how to find the line passing through the middle of two points. This is a simple math concept that can be used in many different applications. I will walk you through the steps of the midpoint formula, and I will also show you how to find the midpoint graphically. First method: A(x1, y1) B(x2, y2) y = mx b m = (x1 - x2) / (y2 - y1) b = (y2^2 - y1^2 x2^2 - x1^2) / (...
Find the Intersection of Two Lines in the Plane: A Step-by-Step Guide
Переглядів 379Рік тому
In this video, I will show you how to find the intersection of two lines in the plane. I will explain the steps in a clear and concise way, and I will use visual aids to help you understand the concepts. By the end of this video, you will be able to find the intersection of two lines in the plane with ease. Case 1: slope-intercept form. y1 = ax b y2 = cx d x = (d - b) / (a - c) y = ax b P = [x,...
How to Draw a Circle Through 3 Points
Переглядів 347Рік тому
Find the center and radius of a circle given 3 points. This is a useful skill for anyone who needs to work with circles, such as engineers, architects, and artists. edgardocpu
Find the Intersection of Two Line Segments in 2D (Easy Method)
Переглядів 6 тис.Рік тому
In this video, I will show you how to find the intersection of two line segments in 2D. This is a simple but important concept in geometry, and it can be used in many different applications. I will explain the method step-by-step, and I will also provide some examples. Points: A(x1,y1) B(x2,y2) C(x3,y3) D(x4,y4) Given two line segments AB and CD, find the point of intersection P(x0, y0). Soluti...
How do I find the distance from a point to a line?
Переглядів 248Рік тому
This video will teach you a simple formula that you can use to find the distance between a point and a line. It's quick and easy, and it works every time! Case 1: The line is in slope-intercept form. p = (x0, y0) y = mx b d = |-m*x0 y0 - b| / sqrt(m^2 1) Case 2: The line is in general form. p = (x0, y0) Ax By C = 0 d = |A*x0 B*y0 C| / sqrt(A^2 B^2) Case 3: The line is defined by two points. p =...
How do I rotate a 2D point?
Переглядів 925Рік тому
Rotating 2D points can be a difficult concept to understand, but it's essential for a variety of tasks in computer graphics and other fields. In this video, we'll use visuals to help you understand the process of rotating 2D points. We'll also provide some examples to help you solidify your understanding. Rotating a point around the origin. P = (x, y) x' = x * cos θ - y * sin θ y' = x * sin θ y...
Formula to draw a regular polygon inscribed or circumscribed to a circle
Переглядів 1,2 тис.Рік тому
Formula to draw a regular polygon inscribed or circumscribed to a circle
Recursion in Mathematics and Programming (Python)
Переглядів 300Рік тому
Recursion in Mathematics and Programming (Python)
Lanczos interpolation and resampling | Image processing
Переглядів 8 тис.3 роки тому
Lanczos interpolation and resampling | Image processing
Cubic interpolation and resampling | Image processing
Переглядів 11 тис.3 роки тому
Cubic interpolation and resampling | Image processing
Linear interpolation and resampling | Image processing
Переглядів 11 тис.3 роки тому
Linear interpolation and resampling | Image processing
Triangulating a polygon with JavaScript | ear clipping algorithm implementation
Переглядів 5 тис.3 роки тому
Triangulating a polygon with JavaScript | ear clipping algorithm implementation
this is gunna help me make a 3d voronoi part destruction system on roblox, thanks
Alan Watts vibes!! Very nice explanation😀
thanks you
I have a question: At 5:58 you have the function ([0.5, 8.5))*0.625 - 0.5 which translates to (approx) -0.2 till 4.8, so why do you stop at 4.2 ? Isn't there one missing point?
Amazing, keep it up!
This video is awesome
Eu só preciso de um dinheiro pra comprar o mé
@@qgabs2030 como tu me encontrou aq
For a second I thought my iPad is possessed
Thanks very much 🇮🇶 🥰
I've found a better way that allows you to get the distance between the point and the line. First, check if the segment is longer than distances between each end and the point (i.e. the projection of the point on the segment line is in the segment) Then, we need to compute the area of the triangle between the ends of the segment and the point. It can be easily done using Heron formula (check wikipedia for details) Then you just have to double the area and divide it with the segment length and you have the distance between the point and the line. You can now check if the point is near enough in your context to be considered on the line.
Your video is very effective. Can you please tell me which tool you use to draw the diagrams and animate?
This is what I am looking for, very easy to understand. Thanks for sharing
Please do a 3d version maybe ? Or a quaternion video ?
Amazing
However, this algorithm is not optimal in the worst case, and it does not deal with unbounded Voronoi cells
whats with all the jump scares? 😭
this is very different from Fortune's algorithm
This is very cool thank you
Okay but why don't you explain why this method doesn't work sometimes for particular degrees depending on the function
For instance if you wanted to minimize cos(x) = c1 where c1 is a constant, using gradient descent one way or another yields you that c1 = 0, but the constant term in the taylor expansion of cos(x) is 1 since cos(x) = 1 - x^2/2 + ... This means that you have to include at least the 2nd term for this to work, or even a higher degree depending on the function other than cos(x) in the example.
when the ray casted from the point crosses a vertex, the one intersection is counted twice (because 2 edges are defined to have that point), which will give wrong answers
Thanks so much for this! I needed to find centroids of irregular polygons for a Matter.js project and your explanation and code examples got me up and running quickly.
Thank you so much for the video!
You're Chopping it
what's the time complexity of this algo?
Never have I studied any algorithms course material but I can bet this is O(n^2). You are iterating over all points once in the outer loop and for each iteration you are going to iterate over all of them again. The text in the right literally says: "for each point p" "for each point q except p"
Out of curiosity, is there a known or best-guess optimal or near-optimal value for the padding in the algorithm? Perhaps related to the mean distance between the sites?
very helpful :))
Is there any research paper that you took this algorithm from?
No, I couldn't find an easy, step-by-step algorithm for building Voronoi diagrams (unlike Delaunay triangulation algorithms, which are easy to find). That's why I created this video.
@@EdgarProgrammatorWhat about the Fortune sweep algorithm?
this channel is art
Thank you
Edgar who is that guy? XD
this is exactly how math should be ngl
lmao the jumpscare
Omg the nun face why 😭😭
idk 😐
This is an awesome explanation of the algorithm! Thank you for sharing such a helpful content!❤❤❤
Would a sixth degree polynomial in x be referred to as "x hexed"? Really like the video.
We are taught this in high school class 12.
Bro this is cool. Can you share the source code for the animations in this video?
oh its good , but i thought i will be able to apply it in my exams lol
The second example would have been solved better by linear regression.
Beautiful and very well made video, I personally loved the old tv vibe to this, not to disregard the instructive yet nicely explained method of gradient descent. Subscribed
Why squaring the function? do we always need to square the function to solve it via gradient descent?
Gradient descent is finding optimal minimum point of the function f(x), not finding solution of f(x)=0. However, optimal point of any f(x) is exactly the solution of f'(x) (derivative function of f(x)). So, in case your function has only one variable, to find the solution of f(x)=0, you can replace the derivative term with f(x) and so on. If your function has more than one variable, you can't replace, cause there's only one function has been given, so you do not know that function is depends on which variable (as mentioned above, if you have one variable, f(x) is derivative function depends on x when you use Gradient Descent to find solution). So, the solution is using Least Square Approximation method as the video has shown. Function f^2(variable) always has optimal minimum point. If minimum point's value is 0, it is the solution. If not, GD still finds optimal minimum point, but it is not the solution.
genuinely curious why you put that in the intro
Where did you get the idea for the intro? It's kind of hilarious and terrifying and I love it.
The video was helpful
Panache defined.
alan watts?
Yes, solving the equation x^5 + x = y for x in terms of y is much more complex than solving quadratic equations because there is no general formula for polynomials of degree five or higher, due to the Abel-Ruffini theorem. This means that, in general, we can't express the solutions in terms of radicals as we can for quadratics, cubics, and quartics. However, we can still find solutions numerically or graphically. Numerical methods such as Newton's method can be used to approximate the roots of this equation for specific values of y. If we're interested in a symbolic approach, we would typically use a computer algebra system (CAS) to manipulate the equation and find solutions.
AWESOME Video! Thanks! Trying to put some basic understanding on this: "We seek a cubic polynomial approximation (ax^3 + bx^2 + cx + d) to cosine on the interval [0, π]." Let's say you want to represent the cosine function, which is a bit wavy and complex, with a much simpler formula-a cubic polynomial. This polynomial is a smooth curve described by the equation where a, b, c, and d are specific numbers (coefficients) that determine the shape of the curve. Now, why would we want to do this? Cosine is a trigonometric function that's fundamental in fields like physics and engineering, but it can be computationally intensive to calculate its values repeatedly. A cubic polynomial, on the other hand, is much simpler to work with and can be computed very quickly. So, we're on a mission to find the best possible cubic polynomial that behaves as much like the cosine function as possible on the interval from 0 to π (from the beginning to the peak of the cosine wave). To find the perfect a, b, c, and d that make our cubic polynomial a doppelgänger for cosine, we use a method that involves a bit of mathematical magic called "least squares approximation". This method finds the best fit by ensuring that, on average, the vertical distance between the cosine curve and our cubic polynomial is as small as possible. Imagine you could stretch out a bunch of tiny springs from the polynomial to the cosine curve-least squares find the polynomial that would stretch those springs the least. Once we have our cleverly crafted polynomial, we can use it to estimate cosine values quickly and efficiently. The beauty of this approach is that our approximation will be incredibly close to the real deal, making it a nifty shortcut for complex calculations.
Elegant
i thought my screen got dust, but unique style. Nice!
Thank you for the video!! Took some time to grasp the second example. No surprise. This gradient descent optimization is at the heart of machine learning.