Search found 45 matches

by kent
Thu Apr 05, 2018 1:39 pm
Forum: Math & Science
Topic: a macro question
Replies: 1
Views: 135

a macro question

Define \pgfmathsetmacro{\lpx}{veclen(\xpx,\ypy)} \pgfmathsetmacro{\lpxx}{veclen(\xpxx,\ypyy)} where we assume that these definitions of the two above PGF macroes are OK. If I then redefine as follows (ie. switching the content of \lpx and \lpxx ) \def\tmptmptmptmp{\lpxx} \def\lpxx{\l...
by kent
Wed Apr 04, 2018 8:34 am
Forum: Math & Science
Topic: numerical conditions Topic is solved
Replies: 8
Views: 2224

numerical conditions Topic is solved

Reading the manuals more carefully, I managed to resolve myself. Sorry, for bothering you with this. :(
by kent
Tue Apr 03, 2018 10:07 am
Forum: Math & Science
Topic: numerical conditions Topic is solved
Replies: 8
Views: 2224

numerical conditions Topic is solved

One more question, how do I compare numerically numbers in if statements such that
if(2.3>5.7}{false}{true}?
by kent
Sun Jan 28, 2018 3:53 pm
Forum: Graphics, Figures & Tables
Topic: intersection Topic is solved
Replies: 13
Views: 1550

intersection Topic is solved

Another related issue, see the example 96.5.4, page 981 in the PGF 3.0 manual illustrating the use of \pgfpointintersectionoflines.

How can I use this to get access the actual intersection point?
\coordinate (X) at (\pgfpointintersectionoflines); does not work.

Kent
by kent
Tue Jan 23, 2018 1:46 pm
Forum: Math & Science
Topic: numerical conditions Topic is solved
Replies: 8
Views: 2224

numerical conditions Topic is solved

By using \let\outt\pgfmathint{\out} I transformed 1.0 to 1 and I could then use \ifthenelse{\outt>0} etc..
But, I still wonder how to use the boolean \ifpgfmathcomparison.
by kent
Mon Jan 22, 2018 3:19 pm
Forum: Math & Science
Topic: numerical conditions Topic is solved
Replies: 8
Views: 2224

numerical conditions Topic is solved

Since I recently got PGF 3.0 installed, I like to revisit the above. What's wrong with the if statement below? \pgfmathapproxequalto{0.15}{0.1499999999}; \let\out\pgfmathresult;%here \out is 1.0 as it should \ifthenelse{\ifpgfmathcomparison}{true}{false};%here I thought I should get true % since I t...
by kent
Mon Jan 15, 2018 10:23 am
Forum: Graphics, Figures & Tables
Topic: intersection Topic is solved
Replies: 13
Views: 1550

intersection Topic is solved

A final comment from my side:
A more straightforward way of doing this may be just to
put \def\t{0} before PGF determines the intersections between the paths (if any).
Then \ifthenelse{\t=0}{}{mark the \t intersection points} will do the trick.

Kent
by kent
Fri Jan 12, 2018 4:53 pm
Forum: Graphics, Figures & Tables
Topic: intersection Topic is solved
Replies: 13
Views: 1550

intersection Topic is solved

I fixed the problem with the use of the following construct

\csname pgfutil@ifundefined\endcsname{pgf@sh@ns@intersection-1}{no marking necessary since there is no intersection points}{do the marking of the intersection points}

thanks for a posting on https://tex.stackexchange.com .

Kent
by kent
Mon Jan 08, 2018 9:59 am
Forum: Graphics, Figures & Tables
Topic: intersection Topic is solved
Replies: 13
Views: 1550

intersection Topic is solved

I modified the example on page 982 in the PGF 3.0 manual to let the square be completely inside the ellipse such that the number of intersection points should be 0. (See the attached file.) As described in the manual, the origion is indeed highlighted. In such case, I would prefer to not highlight a...
by kent
Fri Jan 05, 2018 2:55 pm
Forum: Graphics, Figures & Tables
Topic: intersection Topic is solved
Replies: 13
Views: 1550

intersection Topic is solved

See the attached .tex file where you find one example where the two paths intersect and the code works
and one example where the two paths do not intersect and the code does not work.
Kent

Go to advanced search