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: 532

Views: 151

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: More Realistic Black Hole
Rating: 4.1
Filesize: 87.86 kB
Downloads: 1991
Comments: 7
Ratings: 4
Date added: 2010/11/11 14:34:08
Made with: Algodoo before v1.8.5
Rating: rated 4.1
download
Title: Realistic Black hole 2
Rating: 5
Filesize: 130.13 kB
Downloads: 716
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: 2502
Comments: 2
Ratings: 1
Date added: 2021/08/16 07:54:22
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Minor Black Hole
Rating: 5
Filesize: 56.66 kB
Downloads: 417
Comments: 0
Ratings: 1
Date added: 2013/08/25 23:53:38
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Black hole growth
Rating: 5
Filesize: 0.74 MB
Downloads: 4998
Comments: 1
Ratings: 1
Date added: 2023/08/23 12:07:49
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Black hole
Rating: 5
Filesize: 241.74 kB
Downloads: 1126
Comments: 2
Ratings: 1
Date added: 2013/03/11 07:26:45
Made with: Algodoo v2.0.1
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! :*)