Is there a limit to the number of points you can set in a graphic object?
Or perhaps you can't have more than 380000x2 lines in a variable?
I find that once I exceed around 380000 points that it forgets the first 380000 and continues drawing from there leaving a black square in the middle. Also if I show the progress bar updating as it goes through each loop it adds 10x the length of time for it to complete the function.
I've tried using the "select brush" and "drag from point to point" method for each dot but drawing pixels on the screen takes phenomenally long in live code and "select pencil" and "click at loc" takes even longer.
Anyway here is my stack. It makes a pretty ulam spiral of prime numbers
Ulam Spiral Prime Numbers
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Ulam Spiral Prime Numbers
There's probably a limit on the number of points of some sort, but the first thing I'd check is the algo generating them.nlexa wrote:I find that once I exceed around 380000 points that it forgets the first 380000 and continues drawing from there leaving a black square in the middle.
One quick test is to add this line just before setting the points:
Code: Select all
put (cr&cr is in tList) -- NEW
set the points of graphic "Spiral" to tList
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Ulam Spiral Prime Numbers
I checked it again. The variable can hold the points but it is the graphic object that cant hold much more than 65500 lines of coordinates. I guess a graphic object that has 32750 points is fairly complex.FourthWorld wrote:When a list of points contains a blank line, it will cause the resulting polygon to be discontiguous. Often this is very useful, but if it's not what you're looking for then you may need to review the script to find out why it's generating at least one blank line.
Is there a way to increase this limit? Perhaps I simply have to split it across objects.