This PDF 1.5 document has been generated by TeX / pdfTeX-1.40.15, and has been sent on pdf-archive.com on 20/02/2017 at 01:46, from IP address 84.133.x.x.
The current document download page has been viewed 216 times.
File size: 61.57 KB (1 page).
Privacy: public file
Given:
P1 , P2 , Q, w, c, t
P1 and P2 are the two end points, Q is the point we want to get the color
for, and w is the width of the line. c is the color of the line, and t is a fully
transparent color.
# »
#»
v = P1 P2
# »
#»
u = P1 Q
#»
v · #»
u #»
#»
u #»
v
v =
| #»
v|
d = | #»
u − #»
u #»
v|
#» #»
v · #»
u #»
d = u − #» v
|v|
We are dealing with only two dimensions in a cartesian coordinate system:
q
l = #»
v 21 + #»
v 22
m=
d=
x( #»
v ) ∗ x( #»
u ) + y( #»
v ) ∗ y( #»
u)
l
#»
u 1 − m #»
v 1
d = #»
u 2 − m #»
v2
q
2
2
( #»
u 1 − m #»
v 1 ) + ( #»
u 2 − m #»
v 2)
→ The color of Q is the following:
(
c if d < w ∧ 0 <= m <= 1
t else
1
olatex_1746855_pbzrI8jxpWHr.pdf (PDF, 61.57 KB)
Use the permanent link to the download page to share your document on Facebook, Twitter, LinkedIn, or directly with a contact by e-Mail, Messenger, Whatsapp, Line..
Use the short link to share your document on Twitter or by text message (SMS)
Copy the following HTML code to share your document on a Website or Blog