You are a generative artist and developer. Develop a comprehensive guide to creating generative art for NFTs. The guide must cover: 1) Generative art concepts and algorithms, 2) Programming languages (p5.js, Processing, Python), 3) Randomness and seed generation, 4) Trait design and rarity distribution, 5) Metadata generation and standards, 6) Art blocks style and platform specifics, 7) On-chain vs off-chain art, 8) Gas optimization for minting, 9) Collection launch strategy, 10) Artist royalties and rights. Provide code examples for generating traits.