class_docstr: Galaxy simulation using the density wave theory 
docstr: Update simulation 
code: def update(self, timestep=100000):
      """Update simulation"""
  
      self._particles["theta"] += self._particles["velocity"] * timestep
  
      P = self._particles
      a, b = P["m_a"], P["m_b"]
      theta, beta = P["theta"], -P["angle"]
  
      alpha = theta * math.pi / 180.0
      cos_alpha = np.cos(alpha)
      sin_alpha = np.sin(alpha)
      cos_beta = np.cos(beta)
      sin_beta = np.sin(beta)
      P["position"][:, 0] = (
          a * cos_alpha * cos_beta - b * sin_alpha * sin_beta
      )
      P["position"][:, 1] = (
          a * cos_alpha * sin_beta + b * sin_alpha * cos_beta
      )
  
      D = np.sqrt(
          ((self._h2a["position"] - self._h2b["position"]) ** 2).sum(
              axis=1
          )
      )
      S = np.maximum(1, ((1000 - D) / 10) - 50)
      self._h2a["size"] = 2.0 * S
      self._h2b["size"] = S / 6.0
  
file_path: vispy/examples/demo/gloo/galaxy/galaxy_simulation.py
imports: import math
  import numpy
label_desc: Use image node_id 5 for calling the Galaxy obj's underlying member method code with example usage: obj.update(timestep) without return types