Create a complete, highly interactive p5.js simulation demonstrating: pendulum motion

CRITICAL REQUIREMENTS:
1. ACCURACY: The simulation must be scientifically/mathematically accurate for pendulum motion
2. FUNCTIONAL INTERACTIVITY: All sliders and buttons MUST actually control and modify the simulation behavior in real-time
3. EDUCATIONAL: Users should learn about pendulum motion through experimentation and parameter manipulation

MANDATORY POSITIONING RULES - FOLLOW EXACTLY:
- Canvas: ALWAYS use createCanvas(600, 400) - no other size allowed
- ONLY use these exact Y positions for controls:
  * Sliders row 1: height + 20
  * Sliders row 2: height + 60 
  * Buttons: height + 140
- X positions for sliders: 10, 160, 310, 460 (150px apart)
- X positions for buttons: 10, 110, 210, 310 (100px apart)
- ALL sliders MUST have .style('width', '120px')

EXACT CONTROL TEMPLATE - USE THIS PATTERN:

```javascript
let param1Slider, param2Slider, param3Slider, param4Slider;
let resetBtn, pauseBtn, presetBtn1, presetBtn2;
let isPaused = false;

function setup() {
  createCanvas(600, 400);
  
  // Row 1 - EXACT positioning required
  param1Slider = createSlider(min1, max1, default1, step1);
  param1Slider.position(10, height + 20);
  param1Slider.style('width', '120px');
  
  param2Slider = createSlider(min2, max2, default2, step2);
  param2Slider.position(160, height + 20);
  param2Slider.style('width', '120px');
  
  param3Slider = createSlider(min3, max3, default3, step3);
  param3Slider.position(310, height + 20);
  param3Slider.style('width', '120px');
  
  param4Slider = createSlider(min4, max4, default4, step4);
  param4Slider.position(460, height + 20);
  param4Slider.style('width', '120px');
  
  // Row 2 - only if needed (max 2 additional sliders)
  // param5Slider.position(10, height + 60);
  // param6Slider.position(160, height + 60);
  
  // Buttons - EXACT positioning required
  resetBtn = createButton('Reset');
  resetBtn.position(10, height + 140);
  resetBtn.mousePressed(resetSimulation);
  
  pauseBtn = createButton('Pause/Play');
  pauseBtn.position(110, height + 140);
  pauseBtn.mousePressed(togglePause);
  
  presetBtn1 = createButton('Preset 1');
  presetBtn1.position(210, height + 140);
  presetBtn1.mousePressed(preset1);
  
  presetBtn2 = createButton('Preset 2');
  presetBtn2.position(310, height + 140);
  presetBtn2.mousePressed(preset2);
}

function draw() {
  background(220);
  
  // ALWAYS read values this way
  let param1 = param1Slider.value();
  let param2 = param2Slider.value();
  let param3 = param3Slider.value();
  let param4 = param4Slider.value();
  
  // Title
  fill(0);
  textAlign(CENTER, TOP);
  textSize(18);
  text('Pendulum Motion Simulation', width/2, 15);
  
  // Show ONLY key parameters (left side only)
  textAlign(LEFT, TOP);
  textSize(12);
  text('Param1: ' + param1.toFixed(2), 10, 40);
  text('Param2: ' + param2.toFixed(2), 10, 55);
  text('Param3: ' + param3.toFixed(2), 10, 70);
  text('Param4: ' + param4.toFixed(2), 10, 85);
  
  if (!isPaused) {
    // Your simulation logic here
  }
}

// Required functions
function resetSimulation() { /* reset code */ }
function togglePause() { isPaused = !isPaused; }
function preset1() { /* preset values */ }
function preset2() { /* preset values */ }
```

PHYSICS/SIMULATION REQUIREMENTS FOR PENDULUM MOTION:
- Use scientifically accurate equations and principles
- Realistic parameter ranges with meaningful defaults
- Smooth animation using proper time scaling (deltaTime/1000)
- Visual elements that clearly demonstrate the concept
- Immediate response to parameter changes

VISUAL REQUIREMENTS:
- Title centered at top
- Parameter values displayed in top-left only (max 4-6 lines)
- Clean, uncluttered display
- Color-coded elements where appropriate
- Smooth animations at 60fps

CRITICAL RULES - NEVER DEVIATE:
1. Canvas MUST be exactly createCanvas(600, 400)
2. Sliders MUST use positions: height + 20 or height + 60 ONLY
3. Buttons MUST use position: height + 140 ONLY
4. ALL sliders MUST have .style('width', '120px')
5. X coordinates: sliders 10,160,310,460 / buttons 10,110,210,310
6. Parameters MUST actually affect the simulation visibly
7. Use .value() to read all slider values in draw()

Generate a complete, working simulation for: pendulum motion following these EXACT positioning rules.