Tag：straight line

The dotted line of leetcode
order This paper mainly records the dotted line of leetcode subject There are some points in an XY coordinate system, and we use the array coordinates to record their coordinates respectively, where coordinates[i] = [x, y] represents points with abscissa X and ordinate y. Please judge whether these points belong to the same straight line […]

Custom view practice — Realization of instrument panel pointer rotation effect
Recently, I just saw the dashboard effect. I thought I was just familiar with the custom view. It is not difficult to realize the effect. My level is limited. If there are errors, please point them out and modify them in time. The effect drawing is as follows 1、 Onmeasure override The code will not […]

Use Tencent map SDK in uniapp H5 project
preface This is mainly aimed at H5. There are readymade SDKs for applets or apps;I used the uniapp to make the H5 page of the wechat official account, which needs to convert the longitude and latitude information into the location information of the text description. I applied for a key on the Tencent map development […]

Calculation algorithm of the shortest distance and line segment of two lines / line segments in threedimensional space
There are two space segments $L_ S $, whose starting and ending coordinates are $s_ 0、s_ 1 $, direction vector $\ VEC u = s_ 1s_ 0 $ $L_ T $, whose starting and ending coordinates are $t_ 0、t_ 1 $, direction vector $\ VEC v = t_ 1t_ 0 $Note that the line corresponding […]

Romantic turtle, a Christmas tree for programmers!
I’ve been learning about pyqt5 a few days ago. In the world of Python UI, pyqt5 is just one of them, which is used to make application comparison nice. To present what we need on a canvas, we still have to rely on turtle. It’s reliable. We can do whatever we want with whatever components. […]

Finding the intersection of straight lines by vector cross multiplication
Solution method Two tips: useVector to represent points, you can useVector additionTo showTranslation of points。 usePoint and vectorTo represent a straight line, which can be processedInfinite slopeThe situation. As shown in the figure, two straight lines intersect at the point\(I\)。 Let’s use some\(p_1\)Sum vector\(\vec v_1\)To represent straight line 1, with points\(p_2\)Sum vector\(\vec v_2\)To represent line […]

Menelaus theorem of High School Mathematical Olympiad
Menelaus’ theorem set upnamelyTrilateralOr its extension line, ifIf three points are collinear, then. Picture png Inverse theorem of Menelaus theorem set upnamelyTrilateralOr its extension line, ifbeThree points are collinear Write the two theorems together as:set upnamelyTrilateralThe point on the line (including the extension line of three sides), thenThe necessary and sufficient condition for three points […]

JavaScript webgl Basics
Introduction attemptJavaScript webgl draws a lineAfter that, I finally got familiar with it, but I still have some doubts. I’ll record it in this collection. Origin My GitHub Why should the vertex coordinate range be between – 1.0 and 1.0? In the example of drawing a straight line, if the vertex coordinates are modified according […]

Explore the magical motion path animation motion path
There is a very interesting module in CSS–CSS Motion Path Module Level 1, which translates to motion path. This article will explore the motion path. Through this article, you can learn: What is CSS motion path Simple path animation using CSS motion path Use CSS motion path to animate complex paths What is CSS motion […]

Android scratch effect – proterduffxfermode
Android scratch effect – proterduffxfermode Let’s see the effect This scenario mainly simulates the winning effect of scratch music in some of our apps, which is mainly realized by using the proterduffxfermode class of Android. proterDuffXfermode When drawing with canvas in Android, you can use porterduffxfermode to mix the pixels of the drawn graphics with […]

One way linear regression analysis of Statistics
1. Introduction of regression model Let’s take a look at the regression model. The following explanation comes from Baidu Encyclopedia: Regression model is a predictive modeling technology, which studies the relationship between dependent variable (target) and independent variable (predictor). This technique is usually used forForecast analysisTime series model and the relationship between variablescausal relationship。 The […]

Foundation of Android custom controls (1) — geometry drawing
Although I have a few years of development experience, but the custom control together, little research, shame… When used is Baidu search, copy and paste. Working hours are tight. I always want to finish it as soon as possible（ It’s all excuses. If you want to learn, there will always be time As an Android […]