well, it might be in your definition of what creating a new law from scratch is. do you mean a specific order to put a new law on the books, so to speak? most mandates can be thought of as laws in this sense. after all, they carry the weight of a law. or is greatly expanding or shrinking the areas over which a law can be enforced count as creating a new law from scratch? what about ruling a law to be unconstitutional? that, to some extent, makes the opposite of the unconstitutional law the law.
for an example of a court creating a law by broadening the scope of a previous law, let's look at dred scott. before his case, the compromise of 1820 (aka missouri compact) decreed (among other things) that slavery in the north would be illegal and slavery in the south was ok. southerners sometimes brought their slaves north with them if traveling, but by and large, slaves stayed in the south. in dred's case, his master dragged him to the north, and then died. dred claimed he was free since he was in a northern state, but his master's estate sued him, claiming that dred was the property of his master (regardless of his geographical loction), and as such could be given to someone else in his master's will. the supreme court agreed with the estate of dred's master. this case completely invalidated the Compromise of 1820 because anybody could now go to the south, buy some slaves, and be able to move to the north and keep all their newly purchased slaves. this despite northern states having laws that expressly forbade slavery within their borders. in deciding the dred scott case, SCOTUS effectively overruled any law banning slavery anywhere(including the missouri compact) and created a new national law that allowed slavery within the borders of the United States.
another more recent example has to do with eminent domain. i can't point to a specific case, originally eminent domain was only used for specific government buildings or structures (freeways etc.). Over the years, the scope of eminent domain has been broadened to the point where a city can take your house as long as it had some sort of logic behind why it was taking it(ps, the logic doesn't even have to be correct). Phizer Pharmaceuticals wanted to build a new research complex in some town, unfortunately, they wanted to build on top of previously existing housing (nothing was wrong with the housing). though the houses were well maintained, the city passed new blight laws that made any house in the area Phizer wanted to be officially blighted (for reasons such as not having an attached garage, or for only having two bedrooms--seriously), and then attempted to take the houses through eminent domain. well, the home owners of course sued the city. Even though the only reason the city had for blighting the area was so that a businees that would generate money (and therefore taxes) could use the land in question, and even though the city was not in a depression, or hurting for employment or money, and even though nothing was physically wrong with the houses, SCOTUS decided that the city could take the homes, and let Phizer build a research facility since the city came to the logical conclusion that demolishing homes to build a massive research complex would generate more money than property taxes.
those are two examples off the top of my head. if you can clarify what you mean by creating a law from scratch, I can probably find more examples of where a courts decision created a law.