Home > Net >  Questions about drawing in PICTUREBOX movement trajectory of the object
Questions about drawing in PICTUREBOX movement trajectory of the object

Time:10-17

In the beginning, is to use an array to store objects motion coordinates, and then mapped onto the picturebox, but later found that over time, the size of the array is more and more big, the memory is too big, so he want to use the method of the cache and picturebox size is 300 * 300, for example, in a 300 * 300 the bitmap to draw the trajectory of the object, then to display the bitmap in the picturebox,
The problem here:
1. If the movement trajectory of the object scope is beyond the scope of bitmap?
2. If the bitmap to draw trajectory of a bigger, problem is returned to the origin, I really need to use most of the bitmap to satisfy the need, need to write the program before estimate the range of motion?

Don't know your thoughts, or didn't find the right way, the great god, please give advice or comments!

CodePudding user response:

With bitmap may not save in the province than the array, you array optimization, such as adding new coordinate point coordinate point to judge whether there is the record before, and reduce the sampling rate

CodePudding user response:

reference 1st floor hironpan response:
use bitmap may not save in the province than the array, you array optimization, such as adding new coordinate point coordinate point to judge whether there is the record before, and reduce the trajectory sampling rate




There's a better way? You said this, I have a question: my program way array, after a period of time there is a point card, as you say, my idea is that, according to the display scale in proportion to display the coordinates in the data, then the problem to:
For example, I now have 10000 points in the array, drawing 10000 points, a point card, so I changed to array with 10000 points, only draw 100 points, might already be BuKa? (I ask the purpose of this is mainly the array storing coordinate number, I don't want to give up)

CodePudding user response:

refer to the second floor qq_14993769 response:
Quote: refer to 1st floor hironpan response:

With bitmap may not save in the province than the array, you array optimization, such as adding new coordinate point coordinate point to judge whether there is the record before, and reduce the trajectory sampling rate




There's a better way? You said this, I have a question: my program way array, after a period of time there is a point card, as you say, my idea is that, according to the display scale in proportion to display the coordinates in the data, then the problem to:
For example, I now have 10000 points in the array, drawing 10000 points, a point card, so I changed to array with 10000 points, only draw 100 points, might already be BuKa? (I ask the purpose of this is mainly the array storing coordinate number, I don't want to give up)


Particular case is particular analysis, reducing data storage faster, of course, of course, the premise is "no distortion", like dealing with photos, better high quality photos of the details, but the cost of storage, low quality of pictures while takes up less space, but the details of the performance is not good, want to grasp the balance point,,,

CodePudding user response:

Hello, I want to ask how do you use an array to store the object motion coordinates, and then mapped onto a picturebox? I'm doing this now, but have no idea, it's convenient to specific code? thank you
  •  Tags:  
  • C#
  • Related