Browse Search Popular Register Upload Rules User list Login:
Search:
Realistic Black hole

Image:
screenshot of the scene

Author: AveragePerson

Group: Default

Filesize: 107.97 kB

Date added: 2017-09-17

Rating: 5

Downloads: 535

Views: 153

Comments: 4

Ratings: 1

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

This is my first proper scene, the script used to apply the speed limit is:

For Y axis:
(Change "X" to the desired speed)

postStep = (e)=>{
vel(1) < -X ? {
vel = [vel(0), -X]
} : {
vel(1) > X ? {
vel = [vel(0), X]
} : {}
}
}
For X axis:
(Change "X" to the desired speed)

postStep = (e)=>{
vel(0) < -X ? {
vel = [-X, vel(1)]
} : {
vel(0) > X ? {
vel = [X, vel(1)]
} : {}
}
}

To use it correctly, make a copy of the object you are using, then give one the first code, and the other the second code, then glue them on top of each other and you're done! Have fun! :)
Please log in to rate this scene
edit
Similar scenes
Title: Realistic Black hole
Rating: 5
Filesize: 22.8 kB
Downloads: 1021
Comments: 0
Ratings: 1
Date added: 2017/10/24 11:33:37
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Realistic Black hole 2
Rating: 5
Filesize: 130.13 kB
Downloads: 717
Comments: 2
Ratings: 1
Date added: 2017/10/01 11:39:18
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Black hole feeding on White hole
Rating: 5
Filesize: 375.35 kB
Downloads: 2504
Comments: 2
Ratings: 1
Date added: 2021/08/16 07:54:22
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Star hits black hole. (Actually looks realistic)
Rating: 5
Filesize: 56.87 kB
Downloads: 680
Comments: 0
Ratings: 1
Date added: 2019/05/29 01:20:38
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Black hole
Rating: 5
Filesize: 241.74 kB
Downloads: 1127
Comments: 2
Ratings: 1
Date added: 2013/03/11 07:26:45
Made with: Algodoo v2.0.1
Rating: rated 5
download
Title: black hole
Rating: 5
Filesize: 28.92 kB
Downloads: 749
Comments: 1
Ratings: 1
Date added: 2021/01/27 18:20:46
Made with: Algodoo v2.1.3
Rating: rated 5
download
AveragePerson - I'm glad that I was able to teach you how to script velocities. Now you have a new tool that you can use in many other scenes! :tup:
Very nice! I like how the diffirent "areas" of attraction work.
v := math.vec.len(vel);
v > 50.0 ? {
vel = 50.0 * vel / v
} : {}
Last edited at 2017/11/24 23:47:02 by s_noonan
Thanks, s_noonan! I have a similar script in my "little black book of Thyme programming tips and tricks" but I forgot about it when I showed user AveragePerson how to limit velocity to a preset value. We can do some amazing things when we put our heads together! :*)