Watch, Follow, &
Connect with Us

# Vsevolod Leonov

## Travelling lights, FireMonkey 3D

When I was travelling around CIS countries (Uzbekistan, Georgia, Belarus, Ukraine), I saw some really beautiful places and structures. Look at a pair of videos to see what impressed me plenty: Tbilisi (Georgia) TV tower, Minsk (Belarus) library. I tried to reproduce the similar “travelling lights” effect with FireMonkey. Truly speaking, I was totally unsure I would succeed, but this is FireMonkey! It means, if you have an idea, there are no obstacles to try it. No extra efforts to try with RAD methods for 3D programming.

I’ve simply created 3 verges of a cubic structure with TPlane (FireMonkey 3D component), and then have been having a great fun with programming “travelling”. I’m just switching the “material source” property for every plate. This is a fundamental change in FireMonkey 3D, as now “material” is a separate object of three possible types.

If you want to make something alike or prototype your way of Christmas lights for your house, use the following tip. Test your color switch scheme on small structures 10×10x10 or even planar 2D. And then use Mac (as I did to record the video) , which showed much better performance for 3D with more “light-like” colors.

Posted by Vsevolod Leonov on November 29th, 2012 under C++Builder XE3, Delphi XE3, FireMonkey |

#### 13 Responses to “Travelling lights, FireMonkey 3D”

1. Roland Kossow Says:

"Truly speaking, I was totally unsure I would succeed, but this is FireMonkey!"

I can second that experience …
3D programming gets much easier with firemonkey …
https://www.cybertribe.de/druid/index.php?q=de/node/63

2. Vsevolod Leonov Says:

Thanks, Roland!
A very good example of 3D FireMonkey nice add-on to classical algorythm, not only to illustrate the solution, but primarily verify the correctness of the code.
(of course, knapsack solution is not an algorythm, if we are speaking excact mathematical language, it’s a "greedy" solution - as far as I got the first part of your video, when first bigger boxes are located, putting aside samller ones).

I’d like to ask you to share your demo to Russian Delphi users. Can I somehow take your post, translate into Russian and publish there with all the references to you and your original post? No all in Russia are quite strong in English (as for me, I can understand your Deutsch quite well, even gesprochen :)) But I’d like your video, algorythm and Delphi realization be known and discussed in Russian Delphi community.

3. Roland Kossow Says:

Hi, Vsevolod.
You are right - it is very helpful to see your heuristic and visually reckognize that your code is doing th wrong thing
FMX2 is somhow "What You See Is What You Code" - WYSIWYC .
Considering codesharing - my code needs heavy refactring - I would like to get into direct contact on this with you. Twweted to you.

Best regards

Roland

4. Vsevolod Leonov Says:

5. Roland Kossow Says:

BTW the placement-strategy can be modified in the application.
The allgorithm is the 3D corner allgorithm best described by this paper:
http://www.cs.nott.ac.uk/~mvh/papers/mvh-draft-ecj2011.pdf

Considering code: I did not mean I won’t share. But I need to tidy it up - before it will be useful. Don’t know - when I will find time. Lets get into contact about it.

6. Vsevolod Leonov Says:

I didn’t mean sharing the code, I only asked your permission to translate into Russian and re-post (no matter where, if you wouldn’t mind right here with the link to your en/de version), so then Russian Delphi blog aggregator could grab it.

Thanks for the link to pdf!

7. Roland Kossow Says:

Ah - sure you may do so - if my russian would be better - I could save you the work

"Приятных выходных"

8. Vsevolod Leonov Says:

Danke sehr!
The only question - how to embed your video? For this current blog engine (WordPress) you-tube is ok. Can I have the you-tube link to your video?

9. Roland Kossow Says:

It is not up on youtube …

Ihr Browser kann leider keine eingebetteten Frames anzeigen:
Sie können die eingebettete Seite über den folgenden Verweis
aufrufen: Zeit Online API 1

10. Roland Kossow Says:

Oops - wrong link in the comment. Can you iframe in the blog?

11. Vsevolod Leonov Says:

12. Roland Kossow Says:

Hi.
I made a new screencast in english with callouts.
Enjoy