Python Forum
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
For loop
#1
Hello,

I use python code in dynamo (visual programming) and I have a situation that can not be done (as far as I know) in Dynamo, but I think it could be done with python code.

I have a curve (it could be an arc or straight line, but it is never closed) and at the start point of that curve has a circle it's center point with a parametric radius. Then I need a second circle with it's center point on the intersection of the first circle and the curve. And this should go on until the last circle has no intersection anymore with the curve. Could this be done with a for-loop?
Reply
#2
Probably me, but I'm having difficulty visualizing what your aiming for, something like a nautilus shell?  Anyway, a 'for' loop might be a part of the solution, but most likely you'll need more than that including importing some 3rd party modules.  I've no doubt it can be done in Python, but without seeing the outcome in my mind, it's hard to make any recommendations.  Perhaps those with more nimble minds can point the way.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
You should look at the examples here http://matplotlib.org/2.0.0/examples/
There are literally hundreds of examples, each with the python code that created them.
You should be able to find something that, even remotely, looks like what you want.

Once found, you have the code to start with that you can modify to get just what your looking for.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020