[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] puzzle piece problem.
- To: pygame-users@xxxxxxxx
- Subject: [pygame] puzzle piece problem.
- From: "Joseph king" <king.a.joe@xxxxxxxxx>
- Date: Wed, 7 Nov 2007 10:31:17 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Wed, 07 Nov 2007 10:31:25 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=hB0zMln/gTBi9lSqIts0bSSd5ZwJ2qz56Ytmgn8zbtc=; b=CchQ5LlCoCet0iDldILL+ZGI5P+Q1gDp1ALFwH2xPDPXE9OngqIULrFUASR4tOOkiaFC9NrkrwkhsdfazFq36HXQbhZMAGnxuOmhHacRczwODJ/B4tYmbb2vR6zfAGsJgO9nQb7qbyy5VFDwwniW0bdK4fMFKkiMKLbDt5ewUzU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=FW8q36Teo2zJjTzNcqKJv8FShg2pzHhr4Je03jhNmS/nZOXrkt/9hJmNdY3hqQMayM4YncUMS4fxmh7x3dM6A8fiPqcULq6AiOcAZIHP2G1jxFw0nfb7XoINDa2+OAtygS6SnEsFdCoKjKgUre3ZNMuJnF0JJxMaJFcNd4pxT84=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
hey it is me again on the same issue..... thanks for the help but now
i am on to something a little easier if you program a lot.
My issue now if you saw the code that i had which i will repost on
this...... creating a "cookie cutter" to cut out the puzzle piece
shape of where the user wants and size/shape the user wants......
but i seem to be having an issue with this line of code
Def curvature_func(pos, eb_size, xmod, ymod):
#A general curve to the piece kinda like a wavy line.
state1 = float(pos) / float(xmod) * twopi
state2 = float(pos) / float(ymod) * twopi
state3 = float(pos) / float(xmod+ymod) * twopi
state4 = float(pos) * (2.0/3.0) / float(xmod) * twopi
state5 = float(pos) * (-12.0/5.0) / float(ymod) *twopi
bgen = math.sin(state1) + math.cos (state2) + math.sin(state3)
bgen = bgen - mat.cos(states4) + math.cos(state5)
scale = (eb_size / 5.0
bgen = (bgen * (scale*0.9))
return int(bgen)
seems that it only creates a very slight wave on the edge of the
image. but no matter what i change it does not really give me a
jigsaw like shape.
does any one have any suggestions on a better way to make it more jigsaw like.