# Create wings with particles

Comments in 'Plugin Development' started by MCPEPIG, Mar 23, 2016.

1. Offline

### thebigsmileXDBanned

Joined:
May 19, 2015
Posts:
845
Plugins:
1
Minecraft User:
Nawaf_Craft1b likes this.
2. Offline

### IntyreStaff MemberPocketMine Team

Joined:
Aug 24, 2013
Posts:
118
Minecraft User:
Then do math!
PHP:
``` \$particle->setComponents(\$x1+\$x2, \$y1+\$y2, \$z1); ```
3. Offline

### PEMapModderNotable MemberPlugin Developer

Joined:
Oct 9, 2013
Posts:
7,294
Plugins:
11
Minecraft User:
It is actually quite a good idea to fill curves using equations too.

https://www.desmos.com/calculator/p5be4zf6xi

Let f() and g() be the upper and lower bounding curves.
Code:
```          0.0001 (x + 20)^4 - (x + 20) {-50 <= x <= 0}
f(x) = {
0.0001(x - 20)^4 - (x - 20) {0 <= x <= 50}
```
For example:

PHP:
``` for(\$x = -50; \$x <= 50; \$x++){  for(\$y = round(g(\$x)); \$y <= round(f(\$x)); \$y++){    dot(\$x, \$y);  }} ```
If you can curve a beautiful graph, you can use a method like this.
Skullex and Primus like this.
4. Offline

### thebigsmileXDBanned

Joined:
May 19, 2015
Posts:
845
Plugins:
1
Minecraft User:
and now rotate it
5. Offline

### PEMapModderNotable MemberPlugin Developer

Joined:
Oct 9, 2013
Posts:
7,294
Plugins:
11
Minecraft User:
That's a minor thing; just multiply the X coordinate with relevant sines or cosines.. But it would be more interesting if you want to make it 3D. For example, a pair of wings should point frontwards at the top and bottom but point backwards at the middle.

BTW were you trying to make Mockingjay?
6. Offline

### MyNameIsTriXzNotable Member

Joined:
Aug 17, 2015
Posts:
538
Minecraft User:
Umm, sorry but I dont get your code working, because particle->x and particle->z are null
7. Offline

### MyNameIsTriXzNotable Member

Joined:
Aug 17, 2015
Posts:
538
Minecraft User:
Then tell me/us what is wrong with PEMapModder's code please?
8. Offline

### PEMapModderNotable MemberPlugin Developer

Joined:
Oct 9, 2013
Posts:
7,294
Plugins:
11
Minecraft User:
My code was not real code. I wrote it as pseudo-code, just that it looks very alike to real code
Just understand my theory, rewrite it yourself, and post it here if you want to or have problems with it.
Legoboy0215 likes this.
9. Offline

### PEMapModderNotable MemberPlugin Developer

Joined:
Oct 9, 2013
Posts:
7,294
Plugins:
11
Minecraft User:
A radical view of an open-source terrorist: everything that isn't open-source is useless. Therefore, MCPE is useless (but someone managed to break it down into similar to partial open-source, hence we have the magic here in the MCPE community) (but you can't partially open-source a server with a similar method) (we're here discussing the algorithm, so Wireshark is useless in this case) (who cares about the shops) (free software movement).
Tim // robske Büba likes this.
10. Offline

### MyNameIsTriXzNotable Member

Joined:
Aug 17, 2015
Posts:
538
Minecraft User:
Thats all I got so far, if it interests you:

Or:

Or:

I just converted images to ascii text and then I did input in a file, my code does the rest.
11. Offline

### PEMapModderNotable MemberPlugin Developer

Joined:
Oct 9, 2013
Posts:
7,294
Plugins:
11
Minecraft User:

Or:

Or:

MyNameIsTriXz likes this.
12. Offline

### thebigsmileXDBanned

Joined:
May 19, 2015
Posts:
845
Plugins:
1
Minecraft User:
*PM Community.
13. Offline

### PEMapModderNotable MemberPlugin Developer

Joined:
Oct 9, 2013
Posts:
7,294
Plugins:
11
Minecraft User:
Not really, I actually included the modding community too, for people who made tools to make MCPE more understandable.