If you swap the two parameters before passing them to polarmap, e.g. You can think of them as parameters on equalįooting. Notice that in polarmap the first step was to normalize both x and y so N -= 1 # recalculating the previous value # sign of the derivative, initially chosen # make r go from 0.8 to 1.0 (the min and max tube radius) However, assuming any transformation will do so long as the resultant curve oscillates between the boundary lines of the tube, you could use: def polarmap(x, y): Formula: Cartesian to Polar To convert from Cartesian Coordinates (x,y) to Polar Coordinates (r,): r ( x 2 + y 2 ) tan -1 ( y / x ) This python programs converts Cartesian Coordinate given by user to Polar Coordinate using Cartesian to Polar Conversion Formula. There are many ways to do it since the question does not fully pin down what transformation you are looking for.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |