comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Reducing size of vector EPS / PDF output
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reducing size of vector EPS / PDF output [message #91470 is a reply to message #91469] Fri, 17 July 2015 06:31 Go to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 07/17/2015 02:59 PM, David Fanning wrote:
>>> Ha! Thanks, David. The code is quite crytpic to me (3 calls to
>>> spl_interp!?), but it works and makes beautiful curves;-)
> I don't understand it either. Craig wrote it for me. I do know it has
> been one of the most useful utility routines in the Coyote Library for
> me.:-)


It seems to be quite close to SPLINE_P, I just found out. Howver, with
SPLINE_P you have to estimate the tangent at the junction point by
yourself. See the following example:

pro test_curvature

x = [0.5, 1.5, 1.5, 0.5, 0.5]
y = [0.3, 0.3, 1.3, 1.3, 0.3]

ArcSample, x, y, xas, yas
spline_p, x, y, xsp, ysp
t = [1., -1]
spline_p, x, y, xsp2, ysp2, TAN0=t, TAN1=t

cgPlot, [0, 2], [0, 2], /NODATA, /WINDOW
cgPlots, x, y, color='black', /WINDOW
cgPlots, xas, yas, color='red6', /WINDOW
cgPlots, xsp, ysp, color='blu6', /WINDOW
cgPlots, xsp2, ysp2, color='blu4', /WINDOW
cgLegend, Titles=['ArcSample', 'spline_p', 'spline_p tangent'], $
LINESTYLES=[0,0,0], COLORS=['red6', 'blu6', 'blu4'], $
/ADDCMD, LOCATION=[0.2, 1.8], /DATA

end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: thresholding image
Next Topic: Creating a legend on graphs in postscript, and maps

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:26:36 PDT 2025

Total time taken to generate the page: 0.00375 seconds