View previous topic :: View next topic 
Author 
Message 
kanil gunewardena
Joined: 30 Mar 2012 Posts: 2 Location: USA

Posted: Wed Apr 18, 2012 1:54 am Post subject: Cot(85) 


Tried to paste the equation here it does not allow images.
clicked on Img it does not allow to browse to where my image is saved
Anyway , I entered
R^1 = 1*e^(sin(u)*cot(85) )
With U[ pi/2, 0] And V[ pi, 0]
in new file and saved as Fib.k3ds.
( a) Clicked on Parametric Tab
Chose Spherical Coordinates
CANNOT FIND "LOAD" option here to load my file
(b) So I deleted what was in the entry box ( Examples: Bob_1)
and pasted 1*e^(sin(u)*cot(85) )
Changed ranges for u & v in the boxes
Hit PERFORM button
Gets an error IMPLICIT EQ f(u,v,t) > AT col 3
Synta x Error
How Do I INTERPRET THIS MATH ERROR??
Can someone help me here?
kanil 
PS:
I cut the Error Msg from Screen Shot ,pasted in Paint , copied and tried
to paste it here, but no paste option!
How Do I do this in future enquires? Many Thanks
. [/img] 

Back to top 


nextstep Site Admin
Joined: 06 Jan 2007 Posts: 539

Posted: Wed Apr 18, 2012 3:58 am Post subject: 


Hi,
Try this formula instead : exp(sin(u)*cot(85) )
The message IMPLICIT EQ f(u,v,t) > AT col 3 indicates that the third letter "e" in the formula isn't correct. Here is the list of all functions used in K3DSurf:
Quote:  =============================================================================
 The function string
=============================================================================
The function string understood by the class is very similar to the Csyntax.
Arithmetic float expressions can be created from float literals, variables
or functions using the following operators in this order of precedence:
() expressions in parentheses first
A unary minus
A^B exponentiation (A raised to the power B)
A*B A/B A%B multiplication, division and modulo
A+B AB addition and subtraction
A=B A<B A>B comparison between A and B (result is either 0 or 1)
A&B result is 1 if int(A) and int(B) differ from 0, else 0.
AB result is 1 if int(A) or int(B) differ from 0, else 0.
Since the unary minus has higher precedence than any other operator, for
example the following expression is valid: x*y
Note that the '=' comparison can be inaccurate due to floating point
precision problems (eg. "sqrt(100)=10" probably returns 0, not 1).
The class supports these functions:
abs(A) : Absolute value of A. If A is negative, returns A otherwise
returns A.
acos(A) : Arccosine of A. Returns the angle, measured in radians,
whose cosine is A.
acosh(A) : Same as acos() but for hyperbolic cosine.
asin(A) : Arcsine of A. Returns the angle, measured in radians, whose
sine is A.
asinh(A) : Same as asin() but for hyperbolic sine.
atan(A) : Arctangent of (A). Returns the angle, measured in radians,
whose tangent is (A).
atan2(A,B): Arctangent of A/B. The two main differences to atan() is
that it will return the right angle depending on the signs of
A and B (atan() can only return values betwen pi/2 and pi/2),
and that the return value of pi/2 and pi/2 are possible.
atanh(A) : Same as atan() but for hyperbolic tangent.
ceil(A) : Ceiling of A. Returns the smallest integer greater than A.
Rounds up to the next higher integer.
cos(A) : Cosine of A. Returns the cosine of the angle A, where A is
measured in radians.
cosh(A) : Same as cos() but for hyperbolic cosine.
cot(A) : Cotangent of A (equivalent to 1/tan(A)).
csc(A) : Cosecant of A (equivalent to 1/sin(A)).
eval(...) : This a recursive call to the function to be evaluated. The
number of parameters must be the same as the number of parameters
taken by the function. Usually called inside if() to avoid
infinite recursion.
exp(A) : Exponential of A. Returns the value of e raised to the power
A where e is the base of the natural logarithm, i.e. the
nonrepeating value approximately equal to 2.71828182846.
floor(A) : Floor of A. Returns the largest integer less than A. Rounds
down to the next lower integer.
if(A,B,C) : If int(A) differs from 0, the return value of this function is B,
else C. Only the parameter which needs to be evaluated is
evaluated, the other parameter is skipped; this makes it safe to
use eval() in them.
int(A) : Rounds A to the closest integer. 0.5 is rounded to 1.
log(A) : Natural (base e) logarithm of A.
log10(A) : Base 10 logarithm of A.
max(A,B) : If A>B, the result is A, else B.
min(A,B) : If A<B, the result is A, else B.
sec(A) : Secant of A (equivalent to 1/cos(A)).
sin(A) : Sine of A. Returns the sine of the angle A, where A is
measured in radians.
sinh(A) : Same as sin() but for hyperbolic sine.
sqrt(A) : Square root of A. Returns the value whose square is A.
tan(A) : Tangent of A. Returns the tangent of the angle A, where A
is measured in radians.
tanh(A) : Same as tan() but for hyperbolic tangent.
Examples of function string understood by the class:
"1+2"
"x1"
"sin(sqrt(x^2+y^2))"
"sqrt(XCoord*XCoord + YCoord*YCoord)"
An example of a recursive function is the factorial function:
"if(n>1, n*eval(n1), 1)"
Note that a recursive call has some overhead, which makes it a bit slower
than any other operation. It may be a good idea to avoid recursive functions
in very timecritical applications. Recursion also takes some memory, so
extremely deep recursions should be avoided (eg. millions of nested recursive
calls).
Also note that the if() function is the only place where making a recursive
call is safe. In any other place it will cause an infinite recursion (which
will make the program eventually run out of memory). If this is something
which should be avoided, it may be a good idea to disable the eval()
function completely.
The eval() function can be disabled with the DISABLE_EVAL precompiler
constant (see the beginning of fparser.cc). 
_________________ Cheers,
Abderrahman 

Back to top 




You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum

2005 Powered by phpBB © 2001, 2005 phpBB Group
