cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

ASCII Art - Obfuscated C Doughnut

StuartBruff
23-Emerald II

ASCII Art - Obfuscated C Doughnut

My younger son pointed out the following YouTube video to me: 

 

It shows an ASCII Art toroid (doughnut/donut) written in C, with the code nicely obfuscated to look like a doughnut.

 

I couldn't replicate the obfuscation in Mathcad (although my code is usually obfuscated at the best of times), but I did think that I might try to produce the "animation".   If I had Mathcad 15, I could have used the animation facility, but as I'm using Prime 7.0, I constructed a vector of successive frames, instead.

 

Stuart

 

I would have presented a more generalized version (eg, user-defined: row size, column size, and perspective depth), but I only have a few more days of the 30-day Trial left, and far too many other worksheets under development to spend upon a relatively undemanding task.

 

 

7 REPLIES 7
LucMeekes
23-Emerald III
(To:StuartBruff)

Something like the attached?

Doughnut.gif

 

Luc

StuartBruff
23-Emerald II
(To:LucMeekes)


@LucMeekes wrote:

Something like the attached?


Indeed - including perspective, replacing the equations used in the C code.

 

OOIC, did you use animation or drive the 3D Plot Component directly?

 

Stuart

LucMeekes
23-Emerald III
(To:StuartBruff)

You see all there is to see regarding the Mathcad 'code': FRAME was not used. I plotted the doughnut, turned it's view to a nice position and gave it a modest swing (which is the hardest part). Then I grabbed the screen for the duration of more than a single turn, converted the footage to an animated gif and cut pictures until a single turn of pictures remained.

Luc

StuartBruff
23-Emerald II
(To:LucMeekes)


@LucMeekes wrote:

You see all there is to see regarding the Mathcad 'code': FRAME was not used. I plotted the doughnut, turned it's view to a nice position and gave it a modest swing (which is the hardest part). Then I grabbed the screen for the duration of more than a single turn, converted the footage to an animated gif and cut pictures until a single turn of pictures remained.

Luc


Oh, the things we do for art.  That sounds suspiciously like "hard work" and "effort".   I think I might have to reach for the medicinal brandy and have a lie-down until the effects of those words pass ... 🙂

 

Stuart

LucMeekes
23-Emerald III
(To:StuartBruff)

I think it was 15 minutes...

StuartBruff
23-Emerald II
(To:LucMeekes)


@LucMeekes wrote:

I think it was 15 minutes...


15 minutes?  Who has such time? I once spent 2 years programming some software to avoid 2 minutes work. 

 

Worth it!

 

Stuart

That's strange ... I can't see my Mathcad worksheet as an attachment.

 

Just in case, I'll add it to this post.

 

Stuart

 

Top Tags