Game Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesGame Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old August 13th, 2006, 04:40 PM
disruptive disruptive is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Posts: 2 disruptive User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 58 sec
Reputation Power: 0
Complex Counting

I have a math/algorithmic challenge.

I have a simulation where I have a number of point objects grouped on the surface of a sphere. Now I have a number of these spheres programmticaly determined and each with a different number of points that comprise each sphere.

What I wish to do is count the number of points which make up these objects. I.e. so that for example I count 34 points for sphere A, 40 for sphere B, 45 for sphere 50. They are not exact spheres and the points can be thought of as molecules/atoms making a structure. Therefore I wish to calculate the aggregation number of the spheres.

I store positions of the atoms (points) in 3 D space and I also have a cell indexing architecture - working on a nearest neighbour cell basis. In otherwords given an atom one can determine the atoms in neighbouring cells. One can adjust the finetuning of the cell size.

My question thus relates to how I can count the number of atoms in each sphere given the fact that there is no ordering to the atoms in the spheres. Obviously if the spheres are seperated by some large distance then I can do this without too much trouble. However does anyone have any idea of how best to cope with cases where spheres are seperate but are close together such that the neighbour list of one atom will bring in those on another sphere.

Thanks

Reply With Quote
  #2  
Old September 11th, 2006, 03:41 PM
OscarOfWaldo OscarOfWaldo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 13 OscarOfWaldo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 42 m 43 sec
Reputation Power: 0
I have worked on a similar problem, but in 2D space. For my 2D application, I stored the data for each object in a unique data structure, and in it's own coordinate space, so imagine:

  • X, Y origins and angle of rotation for each object's coordinate space
  • Data Points in each object's coordinate space, for that object's entities

Calculations within each object (distances, areas, etc.) were easily done by considering only their relative coordinate space.

I built a set of subroutines for point-to-point calculations, such as the distance between a point in one object's coordinate space and a point in the second objects coordinate space.

The program I built to do this was written in Pascal, and ran in DOS on some of the original PC's (~1984), and was a dog, taking 10-15 minutes to do run the number of data points we were looking at. On current day units it still runs in DOS, but takes just a second or less to run.

I do not think I have the source code any more, and I surely do not have a Borland Turbo Pascal compiler, but it is my understanding that the program is stilled used by the company it was developed for on a fairly regular basis.

Reply With Quote
  #3  
Old September 12th, 2006, 04:26 AM
displeaser's Avatar
displeaser displeaser is offline
Periodically energetic Perler
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: May 2005
Location: Dublin, Ireland
Posts: 2,266 displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)displeaser User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 76661 Folding Title: Intermediate FolderFolding Points: 76661 Folding Title: Intermediate FolderFolding Points: 76661 Folding Title: Intermediate FolderFolding Points: 76661 Folding Title: Intermediate Folder
Time spent in forums: 4 Weeks 5 h 23 m 13 sec
Reputation Power: 531
Hi Oscar,

you can get old versions of turbo pascal from Borlands museum.

If you want a more modern Pascal compiler then have a look at either FreePascal or bloodsheds Dev-Pascal.

GNU also have a pascal compiler available (I think dev-pascal uses the gnu compiler but with an ide & other useful tools.

Displeaser
__________________
Vi Veri Veniversum Vivus Vici.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesGame Development > Complex Counting


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway