Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_spiral_get_polar ( SPSpiral const *  spiral,
gdouble  t,
gdouble *  rad,
gdouble *  arg 
)

Compute rad and/or arg for point on spiral.

Definition at line 609 of file sp-spiral.cpp.

References SPSpiral::arg, SPSpiral::exp, SPSpiral::rad, and SPSpiral::revo.

Referenced by sp_spiral_is_invalid().

{
      g_return_if_fail (spiral != NULL);
      g_return_if_fail (SP_IS_SPIRAL(spiral));

      if (rad)
            *rad = spiral->rad * pow(t, (double) spiral->exp);
      if (arg)
            *arg = 2.0 * M_PI * spiral->revo * t + spiral->arg;
}


Generated by  Doxygen 1.6.0   Back to index