Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. Here's a dynamic solution. The door has a spring to close it. door.c4d You can make the door anticipate the ball by having a larger hidden collider sphere door2.c4d
  2. This is a bit more like your molecule, using 3 splines molecule_xpresso_v5.c4d
  3. I'd use iteration and a data node iterate.c4d
  4. @MighT here's my latest random project. It's like a game of catch, where the rules are you can't throw to your immediate neighbor or any player who's had the ball in the last 3 throws. uses Roll-It plugin
  5. I came up with a simpler method for the 5-10 random frame delay import c4d, random # pulse goes low for 1F (unfreeze) def main(): global start, rnd, pulse frame = doc.GetTime().GetFrame(doc.GetFps()) if frame == 0: pulse = 0 else: if pulse == 0: start = frame # start of count rnd = random.randint(5, 10) pulse = 1 else: if frame == start + rnd: pulse = 0 random3.c4d I was overthinking the problem 😀
  6. As well as 'random.seed(42) ', having the random node on time (not free) gives totally repeatable results. I use random methods a lot in my scenes, and usually have to adjust the math so the randomness looks right eg in a recent scene I had a sphere bouncing randomly between fixed objects. Sometimes the sphere would oscillate between the same 2 objects multiple times, so I had to add 'while random in history, get new random' to prevent this.
  7. @MighT it's the old dilemma of 'how random do you want this to be'. The generated list could easily be [0, 5, 10, 15, 20, 25...] and still be random. I don't think my list method is too inefficient - the list is only generated once. A solution using just nodes might be more efficient if the XP nodes are compiled as opposed to Python being calculated at run time, but this is only milliseconds - the scene rendering would be much longer per frame.
  8. This is easier in Python. In this file I generate a list of integers where each value is between 5 and 10 greater than the last eg 0, 9, 18, 26, 31, 41, 47, 57, 67, 75, 83, 90, 99, 105... then when anim runs, I check if the current frame is in the list. if in list > output a 0 to unfreeze the random number if not in list > output a 1 to freeze the random number import c4d import random def main(): global my_list, Output1 frame = doc.GetTime().GetFrame(doc.GetFps()) # current frame # make list of frames when output changes if frame == 0: my_list = [0] for a in range(1, 500): # number of value changes rnd = random.randint(5, 10) # random integer between 5 - 10 inclusive temp = my_list[a - 1] # previous list item new_val = temp + rnd # add rnd 5-10 to prev value my_list.append(new_val) # add to list # unhide this line to see list in console # print my_list # if current frame in my_list get new random value if frame in my_list: Output1 = 0 # unfreeze for new value else: Output1 = 1 # freeze current value random 5-10F.c4d
  9. jed

    C4D Cafe || NEWS & UPDATES

    @deck I just had the same problem. I fixed it by deleting some old attachments to free up space. Maybe the quota rule has changed.
  10. jed

    C4D Cafe || NEWS & UPDATES

    I'm on Windows 10 using Microsoft Edge browser, and recently I've noticed that clicking on some parts of the Cafe website only works in full screen mode eg I can't logout unless the browser is full screen. It's like the 'hot zones' move when the browser is resized. Using full screen to access the Cafe isn't a big problem for me, but if this is pixel count related, it could affect members using small laptop or notebook screens. I only noticed this after the Windows 2004 upgrade, so may be related to that. Here's a (too long) video explaining what I mean
  11. jed

    Cardioid gif

    Here's my spirograph - uses python. There's comments in the code 😀 spiro.c4d has control sliders
  12. jed

    Cardioid gif

    The answer to Aristotle's problem is that the smaller inner object 'skids'. Here I put a reference rack in to show the slipping - everything I make recently seems to have cogs 😀
  13. car + terrain = dynamics In this clip your car follows a target, steering itself and reacting to the surface. Note how the front wheels turn and the wheels move up and down on their suspension. You can make the car less (or more) bumpy by changing the target speed and/or suspension settings. Car_0001.c4d
  14. jed

    Cardioid gif

    @MikeA my answer to the cog conundrum is that red is in a rotating frame of reference centered on the blue origin. In this FOR, red only rotates once. It's a rotating object inside another rotating object, so when viewed from outside this FOR the 2 rotations add to make it look like red turns twice. Are you familiar with Aristotle's wheel paradox ? In this pic the large circle rolls along the floor a distance of 1 circumference in 1 revolution. However, the small circle (fixed to the larger one) moves the same distance in 1 rev but has a smaller circumference 😀 https://en.wikipedia.org/wiki/Aristotle's_wheel_paradox
  15. jed

    Cardioid gif

    @bezo They were called spirograph in the UK.
  16. jed

    Cardioid gif

    I saw this math method on wiki - point n on a circle connects to point 2n to make this nice cardioid shape. xpresso here cardioid_reveal.c4d Here's a conundrum for you - although it's obvious once you see it 😀
  17. jed

    Epicyclic Trammel

    The elliptical gears use a tooth from the standard C4D cogwheel. The ellipse ratio is 1.35, and I used XPresso to measure the spline length and scaled it to an integer multiple of the cog pitch - an odd integer in this case so they line up. I put the rotation axes at one of the ellipse focus points (using math from Wiki for position). Using the focus was just a guess, but seems to work 😀
  18. jed

    Epicyclic Trammel

    @MikeA - I had a go at one of thang010146's YouTube designs I'm always impressed at how well C4D can handle difficult dynamics situations. I don't think I'd be able to animate those cogs with math.
  19. jed

    Epicyclic Trammel

    @MikeA thanks for the link - there's a ton of ideas there. Thang knows his stuff. After I made the model in post 1, it bugged me that although it worked, I didn't really understand why the red spinning part had to rotate at 2X the speed of the larger part, and even why the cylinders stayed in sync in the slots. I have managed to solve it with a bit of simple geometry if you're interested - turns out the size of the red part doesn't matter -
  20. jed

    Epicyclic Trammel

    Archimedes made a 2 slot trammel that drew ellipses. https://en.wikipedia.org/wiki/Trammel_of_Archimedes I made one in C4D a while ago that had 3 slots Recently I saw this device on YouTube, and thought I'd try it with 2 spinners I imagined I'd need some trig to make it work, but it seems the small object just has to rotate 2X the speed of the large one. Not sure why... I got a bit carried away, adding planetary gears 😀 I think epicyclic gears are used in electric screwdrivers, and Sturmey-Archer 3 speed bike hub gears. Epicyclic gear math can be a bit difficult, but you're welcome to look at my methods trammel 9.c4d here's a regular epi system that has sliders for speed epi.c4d
  21. jed

    Epicyclic Trammel

    Version 2 is more planetary ie the planets move -
  22. Planetary gears meets the Trammel of Archimedes might amuse someone 😀
  23. Here you go @Igor marble machine 8.c4d The blue cams are colliders rotated by XPresso, the the sliding parts are rigid body on slider connectors. I used a tube for the return run - smoother than just wire tracks (tracks are cosmetic). Gravity is 2X and there's a wind object. I made a procedural XPresso rig to get the slider size and boole cutouts angle.
  24. Based on a ball lift idea I saw on YouTube
  25. jed

    Pinball bumper

    Double click the XPresso tag so the XP window opens. Highlight the condition node and type in new value.
×
×
  • Create New...