## Solution The problem of this contest was to simply draw a fractal of your choice. I chose to draw this fractal as an example:  This fractal was generated with the [chaos game](https://en.wikipedia.org/wiki/Chaos_game) algorithm. The chaos game works on a few simple rules: ##### Start with a set of n points in a 2d plane. ##### Choose a random point x on the plane. ##### Now in a loop make: 1. Choose one of the n points randomly 2. Move x half the distance towards the chosen point 3. Paint a dot at x(Preferably with low alpha, to make the image look smoother). In the example shown above I used 5 points: The 4 corners of a rectangle and the exact center. Here is my implementation: ``` import javax.swing.JFrame; import java.awt.Color; import java.awt.Graphics; public class fractal extends JFrame { double x, y; int len; double [] xP; double [] yP; public fractal() { // Initialize JFrame: super("Fractal"); this.setSize(1800, 1200); this.setVisible(true); this.setResizable(false); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Initialize points: // Here 4 corners of a rectangle and the center: xP = new double[]{100, 100, 1700, 1700, 900}; yP = new double[]{100, 1100, 1100, 100, 600}; len = 5; // Start at one of the corners: x = xP[0]; y = yP[0]; } int n = 0; @Override public void paint(Graphics g) { // Make sure the background really gets drawn black: if(n <= 100) { g.setColor(Color.BLACK); g.fillRect(0, 0, 1800, 1200); n++; } // Use some color different to the background with low alpha value to draw the current position of the dot: g.setColor(new Color(255, 255, 255, 2)); g.drawRect((int)x, (int)y, 1, 1); // Choose a new point: int z = (int)(len * Math.random()); // Move the point half the distance to that point: x -= (x-xP[z])/2; y -= (y-yP[z])/2; } public static void main(String [] args) { fractal f = new fractal(); while(true) { f.repaint(); } } } ``` I wonder why only one participant showed up, although it wasn't that hard. *↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓* ### List of participants with their entries: Name | Solution found | Comment - | - | - @enderrag |  | Looks good, although I don't like that the edges are cut. *↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓* ## Winners: Congratulations @enderrag, you won 2 SBI! *↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓* ### The next contest starts soon. Don't miss it!
author | quantumdeveloper |
---|---|
permlink | computation-contest-8-results-and-solution |
category | programming |
json_metadata | {"tags":["programming","puzzle","contest","steembasicincome","stem","math","steemstem","steemiteducation","palnet","sbi"],"users":["enderrag"],"image":["https://steemitimages.com/p/NTy4GV6ooFRkjTArCrebYc2WCCmX2KY4SfTbUDpHWg6ZYJGkq8E4SrzkN9Wb6bJ6edcAZLw2LnPmaggmW4rxafEMHM5c8ppCQiW5Xgm5ZA6VUbWgxnL39NqcHBLhkgZbdUSrH5QgJEy7SvTzcWSjWCWyQzUqmF3EG9YzbohY?format=match&mode=fit&width=640","https://steemitimages.com/p/D5zH9SyxCKd9GJ4T6rkBdeqZw1coQAaQyCUzUF4FozBvW8Xj3yYZ7TKHn6hm8XbcabrV7Wj8LrypigV8sKrJ67sQQE2mdrVdSc6pa5RmfPhh6k1zzMzoFgKv4MxPA8dfcdVLMt?format=match&mode=fit&width=640"],"links":["https://en.wikipedia.org/wiki/Chaos_game"],"app":"palnet/0.1","format":"markdown","canonical_url":"undefined/@quantumdeveloper/computation-contest-8-results-and-solution"} |
created | 2019-12-30 23:30:57 |
last_update | 2019-12-30 23:30:57 |
depth | 0 |
children | 4 |
last_payout | 2020-01-06 23:30:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.109 HBD |
curator_payout_value | 0.105 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,911 |
author_reputation | 4,456,611,502,865 |
root_title | "Computation Contest #8 Results and Solution" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 93,879,591 |
net_rshares | 1,189,231,787,216 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
edkarnie | 0 | 79,145,417,059 | 20% | ||
crokkon | 0 | 58,322,507,776 | 100% | ||
mytechtrail | 0 | 41,642,342,584 | 25% | ||
stmdev | 0 | 143,896,509 | 1% | ||
tonimontana | 0 | 2,003,201,895 | 100% | ||
nin4i | 0 | 303,805,747 | 100% | ||
zuerich | 0 | 417,383,327,764 | 30% | ||
light-hearted | 0 | 957,836,743 | 100% | ||
remlaps-lite | 0 | 10,306,470,320 | 100% | ||
laissez-faire | 0 | 111,208,531 | 100% | ||
sbi8 | 0 | 248,546,109,055 | 31.69% | ||
darklands | 0 | 112,215,025,559 | 58% | ||
driveforkids | 0 | 33,031,504,409 | 40% | ||
limka | 0 | 0 | 1% | ||
budwizard | 0 | 524,740,677 | 4% | ||
onecent | 0 | 723,957,385 | 22% | ||
babytarazkp | 0 | 6,134,453,343 | 100% | ||
trendovoter | 0 | 79,420,513,488 | 50.57% | ||
mapxv | 0 | 42,226,845,260 | 4.59% | ||
abh12345.stem | 0 | 539,287,627 | 50% | ||
brustem | 0 | 341,861,408 | 100% | ||
curation.stem | 0 | 0 | 75% | ||
untersatz | 0 | 52,101,307,373 | 10% | ||
stem.alfa | 0 | 430,620,885 | 100% | ||
thebilpcointrain | 0 | 16,704,191 | 1% | ||
bilpcoin.pay | 0 | 79,031,689 | 1% | ||
yggdrasil.laguna | 0 | 333,651,825 | 70% | ||
miti.stem | 0 | 344,309,978 | 100% | ||
crikez | 0 | -9,197,756 | -10% | ||
stemisaria | 0 | 1,911,045,892 | 100% | ||
toni.pal | 0 | 0 | 0.6% |
A member bonus $trendotoken tip, and !trendovoter, for @quantumdeveloper from MAPXV! These bonuses are for members, selected at random, and last for a few days. Also consider our [MAPR fund](https://steem-engine.com/?p=market&t=MAPR) and [MAXUV](https://steem-engine.com/?p=market&t=MAXUV) vote bonds too. MAP Steem Fintech: growing your STEEM without SP.
author | mapxv |
---|---|
permlink | re-computation-contest-8-results-and-solution-20191230t233845z |
category | programming |
json_metadata | "{"app": "rewarding/0.1.5"}" |
created | 2019-12-30 23:38:48 |
last_update | 2019-12-30 23:38:48 |
depth | 1 |
children | 1 |
last_payout | 2020-01-06 23:38:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 361 |
author_reputation | 9,809,854,088,378 |
root_title | "Computation Contest #8 Results and Solution" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 93,879,773 |
net_rshares | 0 |
Congratulations @mapxv, you successfuly trended the post shared by @quantumdeveloper! @quantumdeveloper will receive <b>4.72489200</b> [TRDO](https://steem-engine.com/?p=history&t=TRDO) & @mapxv will get <b>3.14992800</b> [TRDO](https://steem-engine.com/?p=history&t=TRDO) curation in 3 Days from Post Created Date! <b>"Call [TRDO](https://steem-engine.com/?p=history&t=TRDO), Your Comment Worth Something!"</b> --- <sup>To view or trade TRDO go to [steem-engine.com](https://steem-engine.com/?p=market&t=TRDO) Join [TRDO Discord Channel](https://discord.gg/wySP8T9) or Join [TRDO Web Site](http://www.trendotoken.info/)</sup>
author | trendotoken |
---|---|
permlink | re-mapxv-re-computation-contest-8-results-and-solution-20191230t233845z-20191230t233859875z |
category | programming |
json_metadata | {"tags":["comments-scot","trendo-bot"],"app":"comments-scot/1.1","format":"markdown"} |
created | 2019-12-30 23:39:00 |
last_update | 2019-12-30 23:39:00 |
depth | 2 |
children | 0 |
last_payout | 2020-01-06 23:39:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 628 |
author_reputation | 5,546,209,053,433 |
root_title | "Computation Contest #8 Results and Solution" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 93,879,776 |
net_rshares | 0 |
Congratulations @quantumdeveloper, your post successfully recieved <b>4.724892</b> [TRDO](https://steem-engine.com/?p=history&t=TRDO) from below listed TRENDO callers:<br> > <sup>@mapxv earned : **3.149928** [TRDO](https://steem-engine.com/?p=history&t=TRDO) curation</sup> --- <sup>To view or trade TRDO go to [steem-engine.com](https://steem-engine.com/?p=market&t=TRDO) Join [TRDO Discord Channel](https://discord.gg/wySP8T9) or Join [TRDO Web Site](http://www.trendotoken.info/)</sup>
author | trendotoken |
---|---|
permlink | re-quantumdeveloper-computation-contest-8-results-and-solution-20200102t234524175z |
category | programming |
json_metadata | {"tags":["trdo","trendo-bot"],"app":"comments-scot/1.1","format":"markdown"} |
created | 2020-01-02 23:45:27 |
last_update | 2020-01-02 23:45:27 |
depth | 1 |
children | 0 |
last_payout | 2020-01-09 23:45:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 491 |
author_reputation | 5,546,209,053,433 |
root_title | "Computation Contest #8 Results and Solution" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 93,966,886 |
net_rshares | 0 |
Congratulations @mapxv, <b>50.57%</b> upvote has been shared with your successful call on the post that shared by @quantumdeveloper! --- <sup>Support <b>@trendotoken</b> projects by delegating : <b>[100SP](https://beta.steemconnect.com/sign/delegateVestingShares?delegator=YOURUSERNAME&delegatee=trendovoter&vesting_shares=100.000%20SP)</b> , <b>[200SP](https://beta.steemconnect.com/sign/delegateVestingShares?delegator=YOURUSERNAME&delegatee=trendovoter&vesting_shares=200.000%20SP) , <b>[500SP](https://beta.steemconnect.com/sign/delegateVestingShares?delegator=YOURUSERNAME&delegatee=trendovoter&vesting_shares=500.000%20SP)</b> , <b>[1000SP](https://beta.steemconnect.com/sign/delegateVestingShares?delegator=YOURUSERNAME&delegatee=trendovoter&vesting_shares=1000.000%20SP)</b> , <b>[2000SP](https://beta.steemconnect.com/sign/delegateVestingShares?delegator=YOURUSERNAME&delegatee=trendovoter&vesting_shares=2000.000%20SP)</b></sup>
author | trendovoter |
---|---|
permlink | re-quantumdeveloper-computation-contest-8-results-and-solution-20191230t233900136z |
category | programming |
json_metadata | {"tags":["trdo","newsteem"],"app":"trdo-voter/1.0","format":"markdown"} |
created | 2019-12-30 23:39:00 |
last_update | 2019-12-30 23:39:00 |
depth | 1 |
children | 0 |
last_payout | 2020-01-06 23:39:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 944 |
author_reputation | 58,041,103,589 |
root_title | "Computation Contest #8 Results and Solution" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 93,879,777 |
net_rshares | 0 |