Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #643
| From | Ingo Thies <ingo.thies@gmx.de> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Plot lines orthogonal to contour lines |
| Date | 2011-10-10 18:14 +0200 |
| Message-ID | <9fgjuoFcf1U1@mid.individual.net> (permalink) |
| References | <8df733b0-c46a-4854-9dc3-7381c6b96437@k34g2000yqm.googlegroups.com> |
Hi Thomas > is there a way to plot lines which are orthogonal to the contour > lines? > In my case, I want to plot a temperature field by isotherms and heat > flow lines. I don't know for sure whether this can be done in gnuplot directly, but what you can do ist to extract the contour lines with "set table 'somefile'", and compute the local derivatives with an external program (e.g. you could write a short C code that applies the differential quotient method). If you compute the derivs with respect to some parameter (the contour lines are parametric, aren't they?), e.g. the line number as the easiest parameter abscissa, for both x and y of the contour line, this gives you two derivatives x' and y', both combined would be the tangential vector (x',y'). Then compute the orthogonal vector (u,v) = (-y',x') (just think of a rotation matrix with a rotation vector of 90 degrees), normalize them to unit length, and then you can use them as unit vectors for your isotherms. HTH, Ingo
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar
Plot lines orthogonal to contour lines Thomas <opp-pr@web.de> - 2011-10-10 06:37 -0700 Re: Plot lines orthogonal to contour lines Ingo Thies <ingo.thies@gmx.de> - 2011-10-10 18:14 +0200
csiph-web