Skip to main content
1-Visitor
April 28, 2018
Solved

cot cotangent in the equation for Curves

  • April 28, 2018
  • 1 reply
  • 9749 views

Hello,

 

I want to use an equation with cotangent in the cylinder coordinate system.
Since cot is not a standard function, I use 1/tan, but I get an error message. Can somebody help me?

Best answer by TomD.inPDX

This is a valid support case.  You have a valid need for a missing function.

 

I'm trying to get to it in reverse, but having all kinds of errors 🙂

 

The closest I got was with the (t+.1) in the two ctan functions.

 

r=(7+(7*2)/sqrt(7^2+2^2*(cos(5*(t+.1)*360)/sin(5*(t+.1)*360))^2))
theta = 360*t
z = 0

 

flower2.PNG

 

 

1 reply

17-Peridot
April 28, 2018

Would this second alternative help?

 alt.PNG

Raisch1-VisitorAuthor
1-Visitor
April 29, 2018

Thanks for the answer. I have already tested this possibility without success.

I want to create two curves with these formulas in the cylinder coordinate system:

Unbenannt.JPG

Many programs, e.g. Excel, can process 1/tan. In Creo I tried the following equations: (Both with error message)

 

r=(7+(7*2)/sqrt(7^2+2^2*(1/tan(5*t*360))^2))
r=(7+(7*2)/sqrt(7^2+2^2*(cos(5*t*360)/sin(5*t*360))^2))

theta = 360*t
z = 0

 

How could I solve this?

17-Peridot
April 29, 2018

You have a division by zero error on the right side (your atan attempt).

If you replace t with (t+.1) it works but that's not the equation.

 

This tells me you want to process "t" before you fit it to the equation.

You can do this with an "if" statement bypassing the 0-state of "t"

If

t=0

then

myctan=0

else

myctan=cos(5*t*360)/sin(5*t*360)

endif

 

Use the variable "myctan" in place of the cotangent conversion

 

^ syntax not confirmed!