HEX
Server: Apache
System: Linux opal14.opalstack.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User: curbgloabal_opal (1234)
PHP: 8.1.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/inkscape/extensions/funcplot.pyo
�
��Yc	@s�dZddlTddlTddlmZddlZddlZddlZddee	e	eee	d�Z
dejfd	��YZe
d
kr�e�Zej�ndS(s,
Copyright (C) 2007 Tavmjong Bah, tavmjong@free.fr
Copyright (C) 2006 Georg Wiora, xorx@quarkbox.de
Copyright (C) 2006 Johan Engelen, johan@shouraizou.nl
Copyright (C) 2005 Aaron Spike, aaron@ekips.org

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

Changes:
 * This program is a modified version of wavy.py by Aaron Spike.
 * 22-Dec-2006: Wiora : Added axis and isotropic scaling
 * 21-Jun-2007: Tavmjong: Added polar coordinates

i����(t*(tdeepcopyNssin(x)scos(x)c,s�|tkr+dt��dt|}n�|krNtjtd��gS||��|����fd�}|
r�||d�|d���fd�}n|�kr�tjtd��gS||��|����fd�}|ry|
ry��krD|d�}��||��|||�}qy|d�}��||��|||�}nyT|	d	kr�td
|	jd��}n|
d	kr�td
|
jd��}nWntk
r�gSX|�|d}|d
}|d}g}|r��dkrg|dkrg|jd||d�gg�|jd|dgg�n�dkr�|dkr�|jd|d�|gg�|jdd|gg�q�n�}|��}|
r|t	|�}|t
|�}|}|}n|s|
r{�|}||�} |
r\| t	|�}!| t
|�}"|!}|"} n|||}#| ||}$nd}#|��}$|r�|jd||d�gg�|jd||�||�gg�n%|jd||�||�gg�xqtt|d��D]Y}%|%d|�}||}&||�} ||&�}'|
r�| t	|�}!| t
|�}"|'t	|&�}(|'t
|&�})|!}|"} |(}&|)}'n|s�|
r�||&|}*| |'|}+nd}*||�}+|jd|||#|�|||$|�|||*|�|| |+|�||�|| �gg�|}| }|*}#|+}$qW|r�|jd|||d�gg�n|S(NisIx-interval cannot be zero. Please modify 'Start X value' or 'End X value'cs|���S(N((tx(tscalextxofftxstart(s*/usr/share/inkscape/extensions/funcplot.pyt<lambda>2sg@cs|��S(N((R(tcenterxtpolar_scalex(s*/usr/share/inkscape/extensions/funcplot.pyR7sshy-interval cannot be zero. Please modify 'Y value of rectangle's top' or 'Y value of rectangle's bottom'cs�|��S(N((ty(tscaleytybottomtyoff(s*/usr/share/inkscape/extensions/funcplot.pyR>sits
lambda x: t"ig@g����MbP?sM s l s M s L s C (
tTruetpitinkexterrormsgt_tevaltstriptSyntaxErrortappendtcostsintrangetint(,RtxendRtytoptsamplestwidththeighttlefttbottomtfxtfpxtfponumttimes2pitpolartisoscaletdrawaxistendptstcoordxtcoordytxzerotyzerotftfptsteptthirdtdstatx0ty0txp0typ0tx1ty1txp1typ1tdx0tdy0titx2ty2txp2typ2tdx1tdy1((RRRR
RRRRs*/usr/share/inkscape/extensions/funcplot.pytdrawfunction%s�

 


 	
	(%
		""
&tFuncPlotcBseZd�Zd�ZRS(c
CsStjj|�|jjddddddddd	d
d�|jjddddddd
ddd
d�|jjddddddddtd
d�|jjddddddddtd
d�|jjdddddddddd
d�|jjdddddddddd
d�|jjdddddd dd!dd"d
d#�|jjd$dddd%dd&dd'd
d(�|jjd)dddddd*dtd
d+�|jjd,dddd%dd-dd.d
d/�|jjd0dddddd1dtd
d2�|jjd3dddddd4dtd
d5�|jjd6dddddd7dtd
d8�|jjd9dddddd:dtd
d;�|jjd<dddddd=dtd
d>�|jjd?dddd%dd@ddAd
dB�|jjdCdddd%ddDddEd
dF�|jjdGdddd%ddHddEd
dF�dS(INs--xstarttactiontstorettypetfloattdestRtdefaultgthelps
Start x-values--xendRg�?sEnd x-values
--times2pitinkboolR&sMultiply x-range by 2*pis--polarR'sPlot using polar coordinatess	--ybottomRg�sy-value of rectangle's bottoms--ytopRsy-value of rectangle's tops-ss	--samplesRRitSampless--fofxtstringtfofxssin(x)sf(x) for plottings--fponumR%s*Calculate the first derivative numericallys--fpofxtfpofxscos(x)sf'(x) for plottings--cliptclips+If True, clip with copy of source rectangles--removetremoves$If True, source rectangle is removeds
--isoscaleR(s"If True, isotropic scaling is useds
--drawaxisR)sIf True, axis are drawns--endptsR*sIf True, end points are addeds--tabttabtsamplings'The selected UI-tab when OK was presseds
--funcplotusetfuncplotuseR
tdummys--pythonfunctionstpythonfunctions(RtEffectt__init__tOptionParsert
add_optionRtFalse(tself((s*/usr/share/inkscape/extensions/funcplot.pyR\�s�c
Cs�d}x�|jj�D]�\}}|jtjdd�krtjjtjdd��}t|j	d��}t|j	d��}t|j	d��}t|j	d��}|j	d�}|r�|j
d|�n|j	d	�}	|	r�|j
d	|	�n|j
d
tjt
|jj|jj|jj|jj|jj||||||jj|jj|jj|jj|jj|jj|jj|jj���|j
d|jj�|j�j|�|jjr�|jd�}
|
dkrtjj |j!j"�tjd
d��}
ntjj |
tjdd��}|jt#|��|j$d�}|j
d|�|j
dd|d�n|jj%r�|j�j%|�q�qqW|dkr�tj&t'd��ndS(NtrecttsvgtpathRR	RR tstylet	transformtdttitles/svg:svg//svg:defstdefstclipPathtids	clip-pathsurl(#t)sPlease select a rectangle((tNonetselectedt	iteritemsttagRtaddNStetreetElementRKtgettsett
simplepatht
formatPathRFtoptionsRRRRRRRRSR%R&R'R(R)R*t	getparentRRTtxpathSinglet
SubElementtdocumenttgetrootRtuniqueIdRURR(
R`tnewpathRjtnodeRR	twthtsttRhRTtclipId((s*/usr/share/inkscape/extensions/funcplot.pyteffect�sX											
-!(t__name__t
__module__R\R�(((s*/usr/share/inkscape/extensions/funcplot.pyRG�s	Kt__main__(t__doc__tmathtrandomtcopyRRRutsimplestyleRR_RFR[RGR�tetaffect(((s*/usr/share/inkscape/extensions/funcplot.pyt<module>s

!��