Basically, take the corn off three or so ears--you want about a cup of kernels--and brown them in some olive oil. Then add the zucchini, let it go a few more minutes, and then add the onions and optional garlic. When the onions are softened, you add some diced tomatoes, turn down the heat a bit, and cook the pasta.
When the pasta's just about done (don't overcook it) throw it in the pan with the veggies, mix, add a bit more olive oil and some of the pasta cooking water if you like, and you're done. Serve with parmesan cheese.