PoC | TryAngels (R&D)

Abstract

R&D

PoC

Second Edition

Third Edition

References

[source code included]

↑ Top ↑

en

PoC – Proof of Concept

Second Edition

With this new version, the solution now enumerates all triangles and displays the results on both a (report) text box and a new tree view – from where you can select any item and highlight its corresponding border on the graphical space.

I revisited the code (which is now much more leaner) to easy readability and understanding, focusing on the contest’s goals and requirements. In order to do so, I stripped out all the gateways, factories, managers and performance-testing code.

As a result, the logical layers and data flow can be now represented as follows:

layers

Figure 1. Data flow throughout the solution’s logical layers

And as you can check (by running and exploring the executable’s solution), I also managed to keep optimized both processing speed and memory usage.

The updated user’s graphical interface now look like this:

ui-stats

Figure 2. TryAngels 0.0.2.0 – Main Form

The TabControl (at the right) was updated to reflect design changes; and the report TextBox is now placed below the graphic space, at the central portion of the screen.

A new TreeView was added to the left side of the screen. It is refreshed – along with the central controls – when the user clicks on the Execute button or changes the value of the NumericUpDown control. It also allows the user to explore and highlight anyone of the inner triangles in the figure.

The next figure depicts an example of its usage:

ui-perf

Figure 3. TryAngels 0.0.2.0 – Selecting a triangle node of the TreeView

Here is another example, with a somewhat large-sized graph:

ui-select2

Figure 4. TryAngels 0.0.2.0 – A 35-side triangle with an inner triangle highlighted.

Note that a 35-side (here with 12 pixels each) equilateral triangle has a total of 11,493 visible, identifiable inner triangles; and that you can highlight each one of them from the TreeView.

Also note that all the inner triangles are uniquely identifiable, properly detailed and summed, and appropriately accounted for.

And finally note that the solution provides all these functionality within the contest’s performance and memory requirements; while implementing an algorithm that both “ensures completeness, and avoids duplication” of any kind.

By the way:

clipNote

As requested by Mr. Francesco Abbruzzese, I hided some relevant parts of code in order to preserve the contest continuity.

They will be disclosed on the next version (0.0.2.1), as soon as possible.

Conclusion

With this new version, the solution satisfies and fulfills all the requirements proposed by the contest.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: